Re: Build-farm - intermittent error in 031_column_list.pl

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-05-25T11:26:11Z
Lists: pgsql-hackers

Attachments

On Wed, May 25, 2022 at 8:16 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> It does "fix" the case of [1].  But AFAIS
> RelationSyncEntry.replicate_valid is only used to inhibit repeated
> loading in get_rel_sync_entry and the function doesn't seem to be
> assumed to return a invalid entry. (Since the flag is not checked
> nowhere else.)
>
> For example pgoutput_change does not check for the flag of the entry
> returned from the function before uses it, which is not seemingly
> safe. (I didn't check further, though)
>
> Don't we need to explicitly avoid using invalid entries outside the
> function?
>

We decide that based on pubactions in the callers, so even if entry is
valid, it won't do anything.  Actually, we don't need to avoid setting
replication_valid flag as some of the publications for the table may
be already present. We can check if the publications_valid flag is set
while trying to validate the entry. Now, even if we don't find any
publications the replicate_valid flag will be set but none of the
actions will be set, so it won't do anything in the caller. Is this
better than the previous approach?

-- 
With Regards,
Amit Kapila.

Commits

  1. Fix ALTER SUBSCRIPTION ... SET PUBLICATION ... command.

  2. Allow specifying column lists for logical replication