From: | Ted Yu <yuzhihong(at)gmail(dot)com> |
---|---|
To: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: bug: copy progress reporting of backends which run multiple COPYs |
Date: | 2023-01-21 01:03:43 |
Message-ID: | CALte62zGMUSZ2Pf2ac3bieX9BWz8rbVtV6XMRkn9cuHdgrcttQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 20, 2023 at 4:51 PM Matthias van de Meent <
boekewurm+postgres(at)gmail(dot)com> wrote:
> On Thu, 19 Jan 2023 at 06:47, Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> >
> > pg_stat_progress_copy was added in v14 (8a4f618e7, 9d2d45700).
> >
> > But if a command JOINs file_fdw tables, the progress report gets bungled
> > up. This will warn/assert during file_fdw tests.
>
> I don't know what to do with that other than disabling COPY progress
> reporting for file_fdw, i.e. calls to BeginCopyFrom that don't supply
> a pstate. This is probably the best option, because a table backed by
> file_fdw would also interfere with COPY TO's progress reporting.
>
> Attached a patch that solves this specific issue in a
> binary-compatible way. I'm not super happy about relying on behavior
> of callers of BeginCopyFrom (assuming that users that run copy
> concurrently will not provide a ParseState* to BeginCopyFrom), but it
> is what it is.
>
> Kind regards,
>
> Matthias van de Meent
>
Hi,
In `BeginCopyFrom`, I see the following :
if (pstate)
{
cstate->range_table = pstate->p_rtable;
cstate->rteperminfos = pstate->p_rteperminfos;
Is it possible to check range_table / rteperminfos so that we don't
introduce the bool field ?
Cheers
From | Date | Subject | |
---|---|---|---|
Next Message | Nathan Bossart | 2023-01-21 01:12:35 | Re: Inconsistency in vacuum behavior |
Previous Message | Matthias van de Meent | 2023-01-21 00:51:28 | Re: bug: copy progress reporting of backends which run multiple COPYs |