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

From: "Gunnar \"Nick\" Bluth" <gunnar(dot)bluth(at)pro-open(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Alexander Kukushkin <cyberdemn(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, x4mmm(at)yandex-team(dot)ru, kondratovaleksey(at)gmail(dot)com
Subject: Re: PATCH: add "--config-file=" option to pg_rewind
Date: 2022-02-27 13:30:33
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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 then, pg_rewind as a whole could use an overhaul. I don't see any use of
>> PQExpBuffer in it, but a lot of char* ...
> Having a lot of char* does not necessarily mean that all of them have
> to be changed to accomodate with PQExpBuffer. My guess that this is a
> case-by-case, where we should apply that in places where it makes the
> code cleaner to follow. In the case of your patch though, the two
> areas changed would make the logic correct, instead, because we have
> to apply correct quoting rules to any commands executed.

Alas! v3 attached.

>> GSOC project? ;-)
> It does not seem so, though there are surely more areas that could
> gain in clarity.

That's universally true ;-)

Best regards,
Gunnar "Nick" Bluth

Eimermacherweg 106
D-48159 Münster

Mobil +49 172 8853339
Email: gunnar(dot)bluth(at)pro-open(dot)de
"Ceterum censeo SystemD esse delendam" - Cato

Attachment Content-Type Size
add_configfile_to_pg_rewind_v3.patch text/x-patch 8.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2022-02-27 14:13:13 CREATE DATABASE IF NOT EXISTS in PostgreSQL
Previous Message Julien Rouhaud 2022-02-27 13:22:50 Re: Support for grabbing multiple consecutive values with nextval()