using pg_receivewal --drop-slot as recovery.conf:recovery_end_command - Mailing list pgsql-admin

From Jerry Sievers
Subject using pg_receivewal --drop-slot as recovery.conf:recovery_end_command
Date
Msg-id 87h8f945xw.fsf@jsievers.enova.com
Whole thread Raw
List 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.consulting@comcast.net


pgsql-admin by date:

Previous
From: Pepe TD Vo
Date:
Subject: Re: install Postgres on RHED 7
Next
From: Kris Deugau
Date:
Subject: Re: install Postgres on RHED 7