using pg_receivewal --drop-slot as recovery.conf:recovery_end_command

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: using pg_receivewal --drop-slot as recovery.conf:recovery_end_command
Date: 2018-12-19 20:28:27
Message-ID: 87h8f945xw.fsf@jsievers.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Admins, I tested $subject and it works like a charm for dropping a no
longer needed slot on physical replication provider during promote of
the standby.

Wondering though about possible race condition...

I see in server logs on standby side that we sigterm the walreceiver but
speculate about cases where the provider side (for any reason) is
delayed in noticing the receiver death...

In turn leading to a refusal to allow slot dropping.

Much ado a about nothing?

pg_receivewal --slot $foo --drop-slot --dbname 'same stuff as primary
conninfo'

This was compelling to use since we are preparing to promote some
standbys at the stroke of midnight inclusive=false for year end
reporting and will *not* be using our external standby0-promote tool
which already knows how to drop the provider slot.

Please advise.

Thx

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres(dot)consulting(at)comcast(dot)net

Browse pgsql-admin by date

  From Date Subject
Next Message Kris Deugau 2018-12-19 22:40:37 Re: install Postgres on RHED 7
Previous Message Pepe TD Vo 2018-12-19 18:41:16 Re: install Postgres on RHED 7