Add shutdown_at_recovery_target option to recovery.conf - Mailing list pgsql-hackers

From Petr Jelinek
Subject Add shutdown_at_recovery_target option to recovery.conf
Date
Msg-id 540F2EBB.6070408@2ndquadrant.com
Whole thread Raw
Responses Re: Add shutdown_at_recovery_target option to recovery.conf  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Hi,

I recently wanted several times to have slave server prepared at certain
point in time to reduce the time it takes for it to replay remaining
WALs (say I have pg_basebackup -x on busy db for example).
Currently the way to do it is to have pause_at_recovery_target true
(default) and wait until pg accepts connection and the shut it down. The
issue is that this is ugly, and also there is a chance that somebody
else connects and does bad things (tm) before my process does.

So I wrote simple patch that adds option to shut down the cluster once
recovery_target is reached. The server will still be able to continue
WAL replay if needed later or can be configured to start standalone.


--
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: WIP Patch for GROUPING SETS phase 1
Next
From: David Johnston
Date:
Subject: Re: PQputCopyEnd doesn't adhere to its API contract