On 11.01.23 19:54, Nathan Bossart wrote:
On Wed, Jan 11, 2023 at 11:09:01AM +0100, Peter Eisentraut wrote:
committed with that fixed
While rebasing my recovery modules patch set, I noticed a couple of small
things that might be worth cleaning up.
committed, thanks
On Wed, Jan 11, 2023 at 11:09:01AM +0100, Peter Eisentraut wrote:
> committed with that fixed
While rebasing my recovery modules patch set, I noticed a couple of small
things that might be worth cleaning up.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
diff --git a/src/backend/a
On 09.01.23 18:53, Nathan Bossart wrote:
+ nativePath = pstrdup(path);
+ make_native_path(nativePath);
+ nativePath = pstrdup(xlogpath);
+ make_native_path(nativePath);
Should these be freed?
committed with that fixed
On Mon, Jan 09, 2023 at 09:36:12AM +0100, Peter Eisentraut wrote:
> On 04.01.23 01:37, Nathan Bossart wrote:
>> On Tue, Dec 20, 2022 at 06:30:40AM +0100, Peter Eisentraut wrote:
>> > + * A value may be NULL. If the corresponding placeholder is found in the
>> > + * input string, the whole function
On 04.01.23 01:37, Nathan Bossart wrote:
In general, +1.
On Tue, Dec 20, 2022 at 06:30:40AM +0100, Peter Eisentraut wrote:
(Still need to think about Robert's comment about lack of error context.)
Would adding the name of the GUC be sufficient?
ereport(ERROR,
In general, +1.
On Tue, Dec 20, 2022 at 06:30:40AM +0100, Peter Eisentraut wrote:
> (Still need to think about Robert's comment about lack of error context.)
Would adding the name of the GUC be sufficient?
ereport(ERROR,
(errmsg("could not build %s", guc_name),
>
> How about this new one with variable arguments?
I like this a lot, but I also see merit in Alvaro's PERCENT_OPT variadic,
which at least avoids the two lists getting out of sync.
Initially, I was going to ask that we have shell-quote-safe equivalents of
whatever fixed parameters we baked in,
On 19.12.22 10:51, Alvaro Herrera wrote:
I think the new one is not great. I wish we could do something more
straightforward, maybe like
replace_percent_placeholders(base_command,
PERCENT_OPT("f", filename),
PERCENT_OPT("d", tar
On Mon, Dec 19, 2022 at 3:13 AM Peter Eisentraut
wrote:
> I agree. Here is an updated patch with the error checking included.
Nice, but I think something in the error report needs to indicate what
caused the problem exactly. As coded, I think the user would have to
guess which GUC caused the pro
On 2022-Dec-19, Peter Eisentraut wrote:
> On 14.12.22 18:05, Justin Pryzby wrote:
> > On Wed, Dec 14, 2022 at 08:31:02AM +0100, Peter Eisentraut wrote:
> > > + return replace_percent_placeholders(base_command, "df", (const char
> > > *[]){target_detail, filename});
> >
> > This is a "compound li
On 14.12.22 18:05, Justin Pryzby wrote:
On Wed, Dec 14, 2022 at 08:31:02AM +0100, Peter Eisentraut wrote:
+ return replace_percent_placeholders(base_command, "df", (const char
*[]){target_detail, filename});
This is a "compound literal", which I gather is required by C99.
But I don't t
On 14.12.22 17:09, Robert Haas wrote:
Well, OK, I'll tentatively cast a vote in favor of adopting
basebackup_to_shell's approach elsewhere. Or to put that in plain
English: I think that if the input appears to be malformed, it's
better to throw an error than to guess what the user meant. In the
c
Justin Pryzby writes:
> On Wed, Dec 14, 2022 at 08:31:02AM +0100, Peter Eisentraut wrote:
>> +return replace_percent_placeholders(base_command, "df", (const char
>> *[]){target_detail, filename});
> This is a "compound literal", which I gather is required by C99.
> But I don't think that's
On Wed, Dec 14, 2022 at 08:31:02AM +0100, Peter Eisentraut wrote:
> + return replace_percent_placeholders(base_command, "df", (const char
> *[]){target_detail, filename});
This is a "compound literal", which I gather is required by C99.
But I don't think that's currently being exercised, so
On Wed, Dec 14, 2022 at 2:31 AM Peter Eisentraut
wrote:
> There are a number of places where a shell command is constructed with
> percent-placeholders (like %x). First, it's obviously cumbersome to
> have to open-code this several times. Second, each of those pieces of
> code silently encodes s
15 matches
Mail list logo