2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.04k stars 154 forks source link

Unable to drop the database when pglogical extension is preloaded #399

Closed NitinJadhav-postgres closed 2 years ago

NitinJadhav-postgres commented 2 years ago

Following are the steps to reproduce the issue.

  1. Include pglogical extension in 'shared_preload_libraries' parameter in postgresql.conf file.
  2. Start the server and connect psql.
  3. Create database testdb;
  4. Drop database testdb; - This command will hang and never completes.

Kindly let me know if I am missing something.

NitinJadhav-postgres commented 2 years ago

Kindly acknowledge.

eulerto commented 2 years ago

Thanks for your report. What's your pglogical version? What's your PostgreSQL version? I bet it is 15. I couldn't reproduce this issue on 14 or earlier. ... poking PostgreSQL code ... Commit postgres/postgres@4eb2176318d includes a signal barrier for DROP DATABASE. pglogical has no logic to handle it in the supervisor code. I think a simple CHECK_FOR_INTERRUPTS might fix it. Another option might be to call a function that handles barrier events.

NitinJadhav-postgres commented 2 years ago

Thanks for the reply. The pglogical version is 2.4.2 and PostgreSQL version is 15. The analysis and the fix looks good to me.

EinKrebs commented 1 year ago

@eulerto can you tell me when this fix will be released?