Re: DROP DATABASE deadlocks with logical replication worker in PG 15.1

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Lakshmi Narayanan Sreethar <lakshmi(at)timescale(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: DROP DATABASE deadlocks with logical replication worker in PG 15.1
Date: 2023-08-02 08:34:17
Message-ID: CC4E583F-1937-4705-A087-7C170D2FC742@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Amit, Zhijie, thank you for your replies!

> On 2 Aug 2023, at 10:20, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> Does this mean that Drop Database is waiting for walsender instead of
> tablesync worker? Can you show the pg_stat_activity row of backend for
> which the Drop Database command is waiting?

Yes, there were no active table syncs.
Unfortunately, I do not have pg_stat_activity: the cluster was deleted amidst investigation session.

> On 2 Aug 2023, at 11:12, Zhijie Hou (Fujitsu) <houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> I think it would be better to get the whole info of pg_stat_activity when DROP
> database hangs. And the log is also needed as it may include log like "still
> waiting for backend with PID xxx to ...".

There are no logs: the cluster was operating in managed service. "DROP DATABASE" worker was operating with log level ERROR.

> Besides, you mentioned there were inactive slots, but just to confirm, is there
> the logical replication running(active) in your environment ? If yes, it would be better
> to collect the bt of the logical replication workers if exists. This is to
> check if the hang is related to the logical replication or not.

The slots for logical replication were not from Postgres consumers. And receiving system as not running at all, so there's no relevant logs.
BTW there were 2 active slots of physical replication.

Thank you!

Best regards, Andrey Borodin.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2023-08-02 16:20:29 Re: pg_hba.conf "authentication file token too long, skipping"
Previous Message Zhijie Hou (Fujitsu) 2023-08-02 06:12:25 RE: DROP DATABASE deadlocks with logical replication worker in PG 15.1