Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE - Mailing list pgsql-general

From Bernd Helmle
Subject Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE
Date
Msg-id D19B4DF60D3D403C6E7B61D6@eje.credativ.lan
Whole thread Raw
In response to COPY TO returning empty result with parallel ALTER TABLE  (Sven Wegener <sven.wegener@stealer.net>)
Responses Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE  (Sven Wegener <sven.wegener@stealer.net>)
List pgsql-general

--On 3. November 2014 18:15:04 +0100 Sven Wegener
<sven.wegener@stealer.net> wrote:

> I've check git master and 9.x and all show the same behaviour. I came up
> with the patch below, which is against curent git master. The patch
> modifies the COPY TO code to create a new snapshot, after acquiring the
> necessary locks on the source tables, so that it sees any modification
> commited by other backends.

Well, i have the feeling that there's nothing wrong with it. The ALTER
TABLE command has rewritten all tuples with its own XID, thus the current
snapshot does not "see" these tuples anymore. I suppose that in
SERIALIZABLE or REPEATABLE READ transaction isolation your proposal still
doesn't return the tuples you'd like to see.

--
Thanks

    Bernd


pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Tablespace limit feature
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE