public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Greg Nancarrow <[email protected]>
To: Tom Lane <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: PublicationActions - use bit flags.
Date: Mon, 24 Jan 2022 21:31:17 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJcOf-d0=vQx1Pzbf+LVarywejJFS5W+M6uR+2d0oeEJ2VQ+Ew@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CAJcOf-d0T+9jy3ois4eytkX_NPpfWMiSA5a=23_5TXSiU26BEg@mail.gmail.com>
<[email protected]>
<CAJcOf-cXspVxTe7pe6QGyCOq6tmftgrxXZ_yRe53mx8L9wqXPw@mail.gmail.com>
<CAJcOf-d0=vQx1Pzbf+LVarywejJFS5W+M6uR+2d0oeEJ2VQ+Ew@mail.gmail.com>
On 21.01.22 01:05, Greg Nancarrow wrote:
> On Tue, Dec 21, 2021 at 12:55 PM Greg Nancarrow <[email protected]> wrote:
>>
>> On Tue, Dec 21, 2021 at 11:56 AM Tom Lane <[email protected]> wrote:
>>>
>>> Removing this is not good:
>>>
>>> if (relation->rd_pubactions)
>>> - {
>>> pfree(relation->rd_pubactions);
>>> - relation->rd_pubactions = NULL;
>>> - }
>>>
>>> If the subsequent palloc fails, you've created a problem where
>>> there was none before.
>>>
>>
>> Oops, yeah, I got carried away; if palloc() failed and called exit(),
>> then it would end up crashing when trying to use/pfree rd_pubactions
>> again.
>> Better leave that line in ...
>>
>
> Attaching an updated patch to fix that oversight.
> This patch thus fixes the original palloc issue in a minimal way,
> keeping the same relcache structure.
Why can't GetRelationPublicationActions() have the PublicationActions as
a return value, instead of changing it to an output argument?
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: PublicationActions - use bit flags.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox