| From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
| Subject: | Add shutdown_at_recovery_target option to recovery.conf |
| Date: | 2014-09-09 16:45:47 |
| Message-ID: | 540F2EBB.6070408@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| shutdown_at_recovery_target-v1.patch | text/x-diff | 3.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Johnston | 2014-09-09 16:47:44 | Re: PQputCopyEnd doesn't adhere to its API contract |
| Previous Message | Andrew Gierth | 2014-09-09 16:43:05 | Re: WIP Patch for GROUPING SETS phase 1 |