Re: base backup client as auxiliary backend process
Sergei Kornilov <sk@zsrv.org>
From: Sergei Kornilov <sk@zsrv.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-11-15T13:52:27Z
Lists: pgsql-hackers
Hello Could you rebase patch please? I have errors during patch apply. CFbot checks latest demonstration patch. > 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? > + Do not copy configuration files, that is, files that end in > + <filename>.conf</filename>. possible we need ignore *.signal files too? > +/* > + * XXX copied from pg_basebackup.c > + */ > + > +unsigned long long totaldone; > +unsigned long long totalsize_kb; > +int tablespacenum; > +int tablespacecount; Variable declaration in the middle of file is correct for coding style? Not a problem for me, I just want to clarify. Should not be declared "static"? Also how about tablespacedone instead of tablespacenum? > The updated has support for tablespaces without mapping. I'm thinking > about putting the mapping specification into a GUC list somehow. > Shouldn't be too hard. I think we can leave tablespace mapping for pg_basebackup only. More powerful tool for less common scenarios. Or for another future patch. regards, Sergei
Commits
-
Factor out InitControlFile() from BootStrapXLOG()
- 79c2385915dd 13.0 landed
-
Reformat code comment
- 9745f93afc56 13.0 landed
-
pg_resetwal: Rename function to avoid potential conflict
- 5f1b8260af96 13.0 landed
-
Expose PQbackendPID() through walreceiver API
- ee4ac46c8eb2 13.0 landed
-
walreceiver uses a temporary replication slot by default
- 329730827848 13.0 landed
-
Make lsn argument of walrcv_create_slot() optional
- c67a55da4ea0 13.0 landed
-
More precise errors from initial pg_control check
- b85e43feb3e8 13.0 landed