PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.

From: <furuyao(at)pm(dot)nttdata(dot)co(dot)jp>
To: <pgsql-hackers(at)postgresql(dot)org>
Cc: <teranishih(at)nttdata(dot)co(dot)jp>
Subject: PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.
Date: 2014-11-14 10:22:04
Message-ID: A9C510524E235E44AE909CD4027AE196BF7D6FB274@MBX-MSG-SV03.msg.nttdata.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

"pg_ctl stop" does't work propley, if --slot option is specified when WAL is flushed only it has switched.
These processes still continue even after the posmaster failed:pg_receivexlog, walsender and logger.

How to reproduce:
1.Start PostgreSQL
2.Create slot
3.Specify --slot option to pg_receivexlog and start it
4.Stop PostgreSQL

Example commands for reproduce:
1.pg_ctl start
2.psql -c "select pg_create_physical_replication_slot('test');"
3.pg_receivexlog --slot='test' -D ./testdir
4.pg_ctl stop

This happen cause --slot option set a flush location to feedback messages,
but it only flush when wal has switched, so walsender wait for the WAL have been replicated forever.

When --slot option is not specified, 'invalid' is set to flush location and it use write location to check replication so it can stop the process propley.

So I thought set 'invalid' to flush location as well in this case, this problem will be solved.
Does --slot option need to set flush location?
Thought?

Regards,

--
Furuya Osamu

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-11-14 10:29:54 Re: Size of regression database
Previous Message Antonin Houska 2014-11-14 09:48:23 Re: Unintended restart after recovery error