Re: database shutdown hang due to walsender

From: Ninad Shah <ninad(dot)shah(at)percona(dot)com>
To: "James Pang (chaolpan)" <chaolpan(at)cisco(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: database shutdown hang due to walsender
Date: 2022-06-24 16:23:33
Message-ID: CAMtEjOZJOeuOesK_ax29h=3NCpGV1BLVwjGvOWOb6oUEmqqOaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Kindly avoid killing manually unless it's killed using signal 15(-TERM).

Talking about walsender, I am quite skeptical about its relation with WAL
sender. Indeed, killing WAL sender would have perhaps resolved the issue;
however, this does not establish WAL sender as a culprit.

Only strace/gdb may surely say who is the actual culprit.

Additionally, rather using pg_ctl stop prefer pg_ctl stop -mf.

Thanks,
Ninad

On Thu, Jun 23, 2022 at 3:42 PM James Pang (chaolpan) <chaolpan(at)cisco(dot)com>
wrote:

> Hi,
>
> Postgresql13.4 on RHEL8.4 , this server setup publication as logical
> replication source (an open source tool named Debezium replicate data from
> this Postgres database as source ), we found systemctl stop postgresql-13
> hang there long time , and use pg_ctl stop
>
>
>
> $ pg_ctl stop
>
> waiting for server to shut
> down............................................................... failed
>
> pg_ctl: server does not shut down
>
>
>
> manually kill walsender , try gain pg_ctl stop it soon got stopped.
>
>
>
> postgres 3291450 3287667 84 08:45 ? 00:05:42 postgres: walsender
> splex_deny xx.xxx.xxx.xxx(32958) idle
>
>
>
>
>
> looks like walsender blocking PG shutdown forever. From pglogs
>
>
>
> 2022-06-23 07:45:20.107 UTC::@:[179416]:[6206-1]::2022-05-16 01:34:02
> UTCLOG: received fast shutdown request
>
> 2022-06-23 07:45:20.107 UTC::@:[179416]:[6207-1]::2022-05-16 01:34:02
> UTCLOG: aborting any active transactions
>
> ...
>
> 2022-06-23 07:45:20.133 UTC::@:[179416]:[6209-1]::2022-05-16 01:34:02
> UTCLOG: background worker "logical replication launcher" (PID 179429)
> exited with exit code 1
>
>
>
>
>
> Thanks,
>
>
>
> James
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ninad Shah 2022-06-24 16:50:48 Re: Postgres performance issue
Previous Message James Pang (chaolpan) 2022-06-23 10:11:55 database shutdown hang due to walsender