Unable to drop a database when pglogical is in preload_shared_libraries
j0r0 opened this issue · comments
Hi,
Seems that i can't drop any dayabase when pglogical is enabled as shared library on Postgrs 15.
This is what i see in the log:
2023-03-10 10:32:59.671 UTC [50756] root@postgres LOG: still waiting for backend with PID 50728 to accept ProcSignalBarrier 2023-03-10 10:32:59.671 UTC [50756] root@postgres STATEMENT: drop database MY_DB
The drop database just hangs forever.
The pglogical extension is not event created. It just enabled in the shared_preload_libraries.
If i remove it from the shared prefload libs, drop database works.
same problem here with pglogical-2.4.2
and postgresql-15.2
used to work with PG-14
, now is broken with PG-15
the PID in ... still waiting for backend with PID ...
is referring to the pglogical supervisor
process
the problem appears to be related to:
this test confirms that if pglogical supervisor
process is removed, the drop
starts to work:
SELECT pg_terminate_backend(pid, 3000)
FROM pg_stat_activity
WHERE backend_type = 'pglogical supervisor' ;
DROP DATABASE IF EXISTS "tester_table" ;
the issue with pglogical supervisor
is resolved when pglogical
is built from source upto this commit:
f27d3c4
but similar deadlock still happens although more sporadically when drop
is blocked now by pglogical apply
process
@eulerto Euler: can you please take a look and see if #403 is sufficient? thank you.
this issue is still present with
https://github.com/2ndQuadrant/pglogical/releases/tag/REL2_4_3