Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XlilW-0008Ux-9R for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2014 18:23:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XlilV-0003e1-LL for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Nov 2014 18:23:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XlilU-0003do-LL; Tue, 04 Nov 2014 18:23:36 +0000 Received: from dd2030.kasserver.com ([85.13.128.37]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XlilP-0005i2-QO; Tue, 04 Nov 2014 18:23:34 +0000 Received: from [172.26.14.87] (wan3.credativ.com [94.79.138.166]) by dd2030.kasserver.com (Postfix) with ESMTPSA id 4C94CE01FF; Tue, 4 Nov 2014 19:23:26 +0100 (CET) Date: Tue, 04 Nov 2014 19:23:21 +0100 From: Bernd Helmle To: Sven Wegener , pgsql-hackers@postgresql.org, pgsql-general@postgresql.org, pgsql-bugs@postgresql.org Subject: Re: COPY TO returning empty result with parallel ALTER TABLE Message-ID: In-Reply-To: References: X-Mailer: Mulberry/4.1.0a3 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline; size=762 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --On 3. November 2014 18:15:04 +0100 Sven Wegener 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers