powa-team / powa-archivist

powa-archivist: the powa PostgreSQL extension
http://powa.readthedocs.io/
PostgreSQL License
51 stars 20 forks source link

DROP queries are hanged if powa is enabled #53

Closed anikin-aa closed 1 year ago

anikin-aa commented 1 year ago

Hi !

We are facing next issue during using POWA and PostgreSQL 15:

  1. Deploy PostgreSQL + POWA related extensions in shared_preload_libraries
  2. Create some test data
  3. Issue drop database query
  4. It will hang, with next PostgreSQL logs:
    [2023-01-30 15:01:16.758 UTC][source=postgresql]STATEMENT:  drop database testdb_kmlbp_0;
    [2023-01-30 15:01:21.760 UTC][source=postgresql]LOG:  still waiting for backend with PID 3173 to accept ProcSignalBarrier

    process with 3173 is POWA:

    postgres   3173  0.0  0.2 333920 54248 ?        Ss   14:30   0:01 postgres: patroni: powa idle

I am using local mode of powa with the bgworker

I've found similar issue for timescaledb, may be it related somehow https://github.com/timescale/timescaledb/issues/4838

anikin-aa commented 1 year ago

@rjuju , i will try to prepare local test case during the day if it's still needed

rjuju commented 1 year ago

Thanks, but it shouldn't be necessary as the error message you mentioned clarified the problem.

I just pushed 085d379d33eb724c541eca4e6895d4f7172125b0 which should solve the problem. If you can test a local build, could you confirm that it also solves the problem for you?

anikin-aa commented 1 year ago

ok, will try during the day and share results

anikin-aa commented 1 year ago

@rjuju , yes, it's working with your latest changes ! Thank you !

rjuju commented 1 year ago

Great news, thanks for the feedback!