Обсуждение: database shutdown hang due to walsender

Поиск
Список
Период
Сортировка

database shutdown hang due to walsender

От
"James Pang (chaolpan)"
Дата:

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

Re: database shutdown hang due to walsender

От
Ninad Shah
Дата:
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@cisco.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