On Tue, Jan 11, 2022 at 2:12 AM Allie Crawford <crawfor...@churchofjesuschrist.org> wrote: > > Thank you so much for your help on this Satya. I have detailed right below > the output of the query you asked me to run. > > > > Master > > postgresql@<master> ~>psql > > psql (13.5) > > Type "help" for help. > > > > postgresql=# select * from pg_locks; > > locktype | database | relation | page | tuple | virtualxid | transactionid > | classid | objid | objsubid | virtualtransaction | pid | mode > | granted | fastpath > > ------------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+---------+-----------------+---------+---------- > > relation | 16384 | 12141 | | | | > | | | | 3/6715 | 2669949 | AccessShareLock > | t | t > > virtualxid | | | | | 3/6715 | > | | | | 3/6715 | 2669949 | ExclusiveLock > | t | t > > (2 rows) > > > > postgresql=# > > > > > > Standby > > postgresql@<standby> ~>psql > > psql (13.5) > > Type "help" for help. > > > > postgresql=# select * from pg_locks; > > locktype | database | relation | page | tuple | virtualxid | transactionid > | classid | objid | objsubid | virtualtransaction | pid | mode > | granted | fastpath > > ------------+----------+----------+------+-------+------------+---------------+---------+-------+----------+--------------------+--------+-----------------+---------+---------- > > relation | 16384 | 12141 | | | | > | | | | 2/50 | 642064 | AccessShareLock > | t | t > > virtualxid | | | | | 2/50 | > | | | | 2/50 | 642064 | ExclusiveLock > | t | t > > virtualxid | | | | | 1/1 | > | | | | 1/0 | 17333 | ExclusiveLock > | t | t > > (3 rows) >
It seems both master and standby have an exclusive lock on db:16384 and relation:12141. Which is this database/relation and why is the app/database holding a lock on it? -- With Regards, Amit Kapila.