Re: base backup client as auxiliary backend process

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: base backup client as auxiliary backend process
Date: 2019-11-22 10:21:53
Message-ID: 8d8c851a-c951-f98e-22c2-f62621c32d3b@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-11-15 14:52, Sergei Kornilov wrote:
>> I looked into this. It seems trivial to make walsender create and use a
>> temporary replication slot by default if no permanent replication slot
>> is specified. This is basically the logic that pg_basebackup has but
>> done server-side. See attached patch for a demonstration. Any reason
>> not to do that?
> Seems this would break pg_basebackup --no-slot option?

After thinking about this a bit more, doing the temporary slot stuff on
the walsender side might lead to too many complications in practice.

Here is another patch set that implements the temporary slot use on the
walreceiver side, essentially mirroring what pg_basebackup already does.

I think this patch set might be useful on its own, even without the base
backup stuff to follow.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Make-lsn-argument-walrcv_create_slot-optional.patch text/plain 2.1 KB
0002-Expose-PQbackendPID-through-walreceiver-API.patch text/plain 3.1 KB
0003-walreceiver-uses-a-temporary-replication-slot-by-def.patch text/plain 6.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message imai.yoshikazu@fujitsu.com 2019-11-22 10:23:09 RE: Planning counters in pg_stat_statements (using pgss_store)
Previous Message Pavel Stehule 2019-11-22 09:57:58 Re: dropdb --force