Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-07 Thread Gunnar "Nick" Bluth
Am 07.04.22 um 01:54 schrieb Michael Paquier: > On Wed, Apr 06, 2022 at 02:32:44PM +0200, Gunnar "Nick" Bluth wrote: >> Ta! Sorry, been ridiculously busy these days, and I do confess that I've >> been struggling a bit with those tests before ;-) > > No problem. Double-checked this morning and

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-06 Thread Michael Paquier
On Wed, Apr 06, 2022 at 02:32:44PM +0200, Gunnar "Nick" Bluth wrote: > Ta! Sorry, been ridiculously busy these days, and I do confess that I've > been struggling a bit with those tests before ;-) No problem. Double-checked this morning and applied, then. -- Michael signature.asc Description:

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-06 Thread Gunnar "Nick" Bluth
Am 06.04.22 um 14:04 schrieb Michael Paquier: > On Tue, Apr 05, 2022 at 11:10:30AM +0900, Michael Paquier wrote: >> In the tests, the only difference between the modes "archive_cli" and >> "archive" is the extra option given to the pg_rewind command, and >> that's a simple redirect to what

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-06 Thread Michael Paquier
On Tue, Apr 05, 2022 at 11:10:30AM +0900, Michael Paquier wrote: > In the tests, the only difference between the modes "archive_cli" and > "archive" is the extra option given to the pg_rewind command, and > that's a simple redirect to what pg_rewind would choose by default > anyway. A more

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-04 Thread Michael Paquier
On Sun, Apr 03, 2022 at 09:31:32PM +0200, Michael Banck wrote: > The patch applies, make is ok, make check is ok, pg_rewind TAP tests > are ok. + appendPQExpBufferStr(postgres_cmd, " --config_file="); + appendShellString(postgres_cmd, config_file); Nit. This is a valid option for the

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-04 Thread Greg Stark
Just reposting the previous patches to straighten out the cfbot. --- /usr/lib/python3/dist-packages/patroni/postgresql/__init__.py 2022-02-18 13:16:15.0 + +++ __init__.py 2022-04-03 19:17:29.952665383 + @@ -798,7 +798,8 @@ return True def get_guc_value(self, name):

Re: PATCH: add "--config-file=" option to pg_rewind

2022-04-03 Thread Michael Banck
Hi, Am Donnerstag, dem 10.03.2022 um 15:28 +0100 schrieb Gunnar "Nick" Bluth: > Am 10.03.22 um 14:43 schrieb Michael Banck: > > some minor comments, I didn't look at the added test and I did not > > test the patch at all, but (as part of the Debian/Ubuntu packaging > > team) I think this patch is

Re: PATCH: add "--config-file=" option to pg_rewind

2022-03-10 Thread Gunnar "Nick" Bluth
Am 10.03.22 um 14:43 schrieb Michael Banck: > Heya, > > some minor comments, I didn't look at the added test and I did not test > the patch at all, but (as part of the Debian/Ubuntu packaging team) I > think this patch is really important: Much appreciated! [...] > I think we usually just say

Re: PATCH: add "--config-file=" option to pg_rewind

2022-03-10 Thread Michael Banck
Heya, some minor comments, I didn't look at the added test and I did not test the patch at all, but (as part of the Debian/Ubuntu packaging team) I think this patch is really important: On Tue, Mar 01, 2022 at 12:35:27PM +0100, Gunnar "Nick" Bluth wrote: > diff --git

Re: PATCH: add "--config-file=" option to pg_rewind

2022-03-01 Thread Gunnar "Nick" Bluth
Am 01.03.22 um 05:18 schrieb Michael Paquier: On Mon, Feb 28, 2022 at 08:48:23PM +0100, Gunnar "Nick" Bluth wrote: So, how should we call the global "find the * 'postgres' executable and boil out if that fails" function? char postgres_exec_path[MAXPGPATH] = findPostgresExec(); ? That

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-28 Thread Michael Paquier
On Mon, Feb 28, 2022 at 08:48:23PM +0100, Gunnar "Nick" Bluth wrote: > So, how should we call the global "find the * 'postgres' executable and > boil out if that fails" function? > char postgres_exec_path[MAXPGPATH] = findPostgresExec(); > ? That would mean only a couple of lines gained,

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-28 Thread Gunnar "Nick" Bluth
Am 28.02.22 um 12:56 schrieb Michael Paquier: On Sun, Feb 27, 2022 at 02:30:33PM +0100, Gunnar "Nick" Bluth wrote: That's universally true ;-) -# Internal routine to enable archive recovery command on a standby node +# Internal routine to enable archive recovery command on a standby node. +#

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-28 Thread Michael Paquier
On Sun, Feb 27, 2022 at 02:30:33PM +0100, Gunnar "Nick" Bluth wrote: > That's universally true ;-) -# Internal routine to enable archive recovery command on a standby node +# Internal routine to enable archive recovery command on a standby node. +# Returns generated restore_command. sub

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-27 Thread Gunnar "Nick" Bluth
Am 27.02.22 um 13:06 schrieb Michael Paquier: On Sat, Feb 26, 2022 at 09:55:20AM +0100, Gunnar "Nick" Bluth wrote: Am 26.02.22 um 06:51 schrieb Michael Paquier: Shouldn't this one use appendShellString() on config_file? It probably should, yes. I don't fancy this repetitive code myself. But

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-27 Thread Michael Paquier
On Sat, Feb 26, 2022 at 09:55:20AM +0100, Gunnar "Nick" Bluth wrote: > Am 26.02.22 um 06:51 schrieb Michael Paquier: >> Shouldn't this one use appendShellString() on config_file? > > It probably should, yes. I don't fancy this repetitive code myself. > But then, pg_rewind as a whole could use an

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-26 Thread Gunnar "Nick" Bluth
Am 26.02.22 um 06:51 schrieb Michael Paquier: On Fri, Feb 25, 2022 at 10:35:49AM +0100, Gunnar "Nick" Bluth wrote: Am 24.02.22 um 14:46 schrieb Daniel Gustafsson: Actually, I think this looks like a saner approach. Putting a config setting in two place (postgresql.conf and on the commandline

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-25 Thread Michael Paquier
On Fri, Feb 25, 2022 at 10:35:49AM +0100, Gunnar "Nick" Bluth wrote: > Am 24.02.22 um 14:46 schrieb Daniel Gustafsson: >> Actually, I think this looks like a saner approach. Putting a config setting >> in two place (postgresql.conf and on the commandline for pg_rewind) is a >> recipe >> for them

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-25 Thread Gunnar "Nick" Bluth
Am 24.02.22 um 14:46 schrieb Daniel Gustafsson: On 24 Feb 2022, at 14:43, Gunnar Nick Bluth wrote: That looks just as good to me, and it already has tests, so I'll happily step down! Actually, I think this looks like a saner approach. Putting a config setting in two place

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-24 Thread Daniel Gustafsson
> On 24 Feb 2022, at 14:43, Gunnar Nick Bluth wrote: > That looks just as good to me, and it already has tests, so I'll happily step > down! Actually, I think this looks like a saner approach. Putting a config setting in two place (postgresql.conf and on the commandline for pg_rewind) is a

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-24 Thread Gunnar "Nick" Bluth
Am 24.02.2022 um 14:08 schrieb Daniel Gustafsson: On 24 Feb 2022, at 10:27, Alexander Kukushkin wrote: Hello Gunnar, On Thu, 24 Feb 2022 at 10:03, Aleksander Alekseev wrote: wants to use the "-c" option on a typical Debian/Ubuntu installation (where the config resides below

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-24 Thread Daniel Gustafsson
> On 24 Feb 2022, at 10:27, Alexander Kukushkin wrote: > > Hello Gunnar, > > On Thu, 24 Feb 2022 at 10:03, Aleksander Alekseev > wrote: > > > wants to use the "-c" option on a typical Debian/Ubuntu installation > > (where the config resides below /etc/postgresql/), pg_rewind needs a way > >

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-24 Thread Aleksander Alekseev
Hi hackers, > It took me a while to understand the meaning of -c. Maybe > changing it to --restore-target-wal will make it easier to > understand. +1, I "stumbled" while reading this too at first. -- Best regards, Aleksander Alekseev

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-24 Thread Alexander Kukushkin
Hello Gunnar, On Thu, 24 Feb 2022 at 10:03, Aleksander Alekseev wrote: > > wants to use the "-c" option on a typical Debian/Ubuntu installation > > (where the config resides below /etc/postgresql/), pg_rewind needs a way > > to be told where the postgresql.conf actually is. > > > > The

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-24 Thread Aleksander Alekseev
Hi Gunnar, > During a Patroni PR discussion > (https://github.com/zalando/patroni/pull/2225), we realised that if one > wants to use the "-c" option on a typical Debian/Ubuntu installation > (where the config resides below /etc/postgresql/), pg_rewind needs a way > to be told where the

Re: PATCH: add "--config-file=" option to pg_rewind

2022-02-23 Thread Jacob Champion
On Wed, 2022-02-23 at 16:28 +0100, Gunnar "Nick" Bluth wrote: > I'm extremely unhappy that I called it "--config-file" here, while > "postgres" itself wants "--config_file". But as the other dashed options > of pg_rewind are, well, dashed and not underscored, it seemed to be > better that the

PATCH: add "--config-file=" option to pg_rewind

2022-02-23 Thread Gunnar "Nick" Bluth
Hi! During a Patroni PR discussion (https://github.com/zalando/patroni/pull/2225), we realised that if one wants to use the "-c" option on a typical Debian/Ubuntu installation (where the config resides below /etc/postgresql/), pg_rewind needs a way to be told where the postgresql.conf