We have one RDS PostgreSQL running. I run pg_locks to check the locks on objects - There is this one table which is always locked( RowExclusiveLock ) by Superuser and when I try to get the details of that session from pg_Stat_Activity, it shows a Background worker and looks like it's not even doing anything, This table is part of replication and this lock causes replication session to get blocked. Any clue?
Asked
Active
Viewed 436 times
0
-
Check what extensions you have installed. It might be caused by one of them. – Laurenz Albe Nov 08 '20 at 06:25
-
@LaurenzAlbe Thanks for the response. I did check. There are these extensions installed - "plpgsql" "unaccent" "uuid-ossp" "plperl" "pg_stat_statements" "dblink" "postgis" "fuzzystrmatch" "postgis_tiger_geocoder" "postgis_topology" There was pg_repack,pgstatuple and pgaudit as well which I removed after your comment. I still see that background worker blocking the same table and it's indexes. – Chetan Dev Khanna Nov 08 '20 at 07:45
-
@LaurenzAlbe I tried terminating that session but that respawn immediately. This table is a part of replication. data is getting inserted through logical replication and this table is getting replicated from this instance to SQL server through attunity. – Chetan Dev Khanna Nov 08 '20 at 07:47
-
You'll have to identity the backend process. For that, look at `pg_stat_activity` as superuser. – Laurenz Albe Nov 09 '20 at 06:03