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
Thibaud WALKOWIAK complained recently about pg_repack clients having to wait on each other while concurrently operating on tables in the same database. Presumably this wait comes from the SQL_XID_SNAPSHOT check, which does not bother ignoring other pg_repack clients based on application_name.
Fixed in a072cc9 and f6ca290. The queries ended up tiny bit different than what I initially proposed:
make sure to explicitly exclude conn2 based on its backend PID, since we can't trust application_name in all cases (e.g. under installcheck, or on old versions)
use LEFT JOIN against pg_stat_activity, in case there are locks in pg_locks which don't show up in pg_stat_activity
don't hardcode the application_name 'pg_repack' in the query, just in case our PROGRAM_NAME is something different
Thibaud WALKOWIAK complained recently about pg_repack clients having to wait on each other while concurrently operating on tables in the same database. Presumably this wait comes from the SQL_XID_SNAPSHOT check, which does not bother ignoring other pg_repack clients based on application_name.
I proposed a simple fix to have SQL_XID_SNAPSHOT ignore other pg_repack clients using pg_stat_activity.application_name here:
http://lists.pgfoundry.org/pipermail/reorg-general/2012-November/000137.html
(Will only help on 9.0 or later, since that's when we have application_name exposed.)
The text was updated successfully, but these errors were encountered: