FIRST man 7487a775d5 skip transactions and locks in other databases when checking pg_locks' entries
problem: in case there are open transactions on other databases then the
         one pg_repack is working on and pg_locks doesn't contain any
         information about the affected database oid of the locked relation
         (e.g. there is no locked relation, only an open transaction),
         pg_repack will wait for that connection to release the lock
         (even if the relation that gets reorganized is held in an
         different database).

solution: join pg_database (via pg_stat_activity's datid) and check
          if the connection (of the conflicted transaction) is established
          on a different database than the relation treated by pg_repack
          and skip them.
          furthermore don't exclude transactions from other databases when
          shared objects are locked.
2013-08-02 15:22:16 +02:00
..
2012-11-10 22:33:57 +00:00