You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running gearman using Postgres, currently only the default schema can be used when specifying the table name.
If --libpq-table=someschema.gearman_table were used it would correctly generate the table on deploy in the specified schema, but the next time it is run again, it will check for table name in INFORMATION_SCHEMA.TABLES rather than breaking it into schema and table name, then generate an error that the resource already exists when it tries to create it.
A possible fix is to check before this query if the table name contains a dot (.) character and if so, break it apart and run query as TABLE_SCHEMA = and TABLE_NAME = https://github.com/gearman/gearmand/blob/master/libgearman-server/plugins/queue/postgres/queue.cc#L207
The text was updated successfully, but these errors were encountered:
jaronwest
changed the title
When using Postgres for persistent tasks, check if libpg-table includes schema name
When using Postgres for persistent tasks, check if libpq-table includes schema name
Nov 21, 2023
When running gearman using Postgres, currently only the default schema can be used when specifying the table name.
If
--libpq-table=someschema.gearman_table
were used it would correctly generate the table on deploy in the specified schema, but the next time it is run again, it will check for table name in INFORMATION_SCHEMA.TABLES rather than breaking it into schema and table name, then generate an error that the resource already exists when it tries to create it.A possible fix is to check before this query if the table name contains a dot (.) character and if so, break it apart and run query as
TABLE_SCHEMA =
andTABLE_NAME =
https://github.com/gearman/gearmand/blob/master/libgearman-server/plugins/queue/postgres/queue.cc#L207
The text was updated successfully, but these errors were encountered: