Including replication slot data in base backups

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Including replication slot data in base backups
Date: 2014-04-01 12:24:49
Message-ID: CAB7nPqTBik66XosbXpRoSneQQ9EPPXr0tVpLc4vGLB5hWz0Rkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

As of now, pg_basebackup creates an empty repository for pg_replslot/
in a base backup, forcing the user to recreate slots on other nodes of
the cluster with pg_create_*_replication_slot, or copy pg_replslot
from another node. This is not really user-friendly especially after a
failover where a given slave may not have the replication slot
information of the master that it is replacing.

The simple patch attached adds a new option in pg_basebackup, called
--replication-slot, allowing to include replication slot information
in a base backup. This is done by extending the command BASE_BACKUP in
the replication protocol.

As it is too late for 9.4, I would like to add it to the first commit
fest of 9.5. Comments are welcome.

Regards,
--
Michael

Attachment Content-Type Size
20140401_replslot_backup.patch text/plain 8.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-01 14:03:36 Re: Patch to add support of "IF NOT EXISTS" to others "CREATE" statements
Previous Message Andrzej Mazurkiewicz 2014-04-01 12:13:52 Re: Inheritance of foregn key constraints.