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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Build-farm - intermittent error in 031_column_list.pl
Date: 2022-05-25 11:26:11
Message-ID: CAA4eK1+T-ETXeRM4DHWzGxBpKafLCp__5bPA_QZfFQp7-0wj4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 25, 2022 at 8:16 AM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)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.

Attachment Content-Type Size
skip_missing_pubs.2.patch application/octet-stream 2.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2022-05-25 11:26:21 Re: Improving connection scalability (src/backend/storage/ipc/procarray.c)
Previous Message Matthias van de Meent 2022-05-25 10:54:46 Re: adding status for COPY progress report