agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Martijn van Oosterhout <kleptog@svana.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: WAL logging problem in 9.4.3?
Date: Thu, 09 Jul 2015 13:27:43 -0400
Message-ID: <22784.1436462863@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHGQGwHGMeqA7PbRj9e-cgA7-Sy09c+Ysyy=6Ts=vLOynpU2Hg@mail.gmail.com>
References: <CAHGQGwEXta1tMF6o-FcDcjMgCF=jnZLj3v3EoePvsEN4aexJnA@mail.gmail.com>
<20150703060137.GB20285@svana.org>
<CAHGQGwFtOMv5h8eKX6zf+9_0UxpcTsyH9xAnyv6KdGH4BonLiw@mail.gmail.com>
<28320.1435935120@sss.pgh.pa.us>
<CAHGQGwGzxAyKLUm+z2n43-ee6u976jLmQAz=pPBVzSueD3CAig@mail.gmail.com>
<20150703164931.GI3291@awork2.anarazel.de>
<20150703170229.GJ3291@awork2.anarazel.de>
<20150703172605.GM3291@awork2.anarazel.de>
<CAHGQGwGGM2OBh4WOTd8wWqxKzRy+WdJX+-fxxPCWNz4eeJ1aQQ@mail.gmail.com>
<27532.1436195680@sss.pgh.pa.us>
<20150706152123.GK8902@alap3.anarazel.de>
<28415.1436197794@sss.pgh.pa.us>
<CAHGQGwHGMeqA7PbRj9e-cgA7-Sy09c+Ysyy=6Ts=vLOynpU2Hg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Fujii Masao <masao.fujii@gmail.com> writes:
> On Tue, Jul 7, 2015 at 12:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> One idea I had was to allow the COPY optimization only if the heap file is
>> physically zero-length at the time the COPY starts.
> This seems not helpful for the case where TRUNCATE is executed
> before COPY. No?
Huh? The heap file would be zero length in that case.
> So, if COPY is executed multiple times at the same transaction,
> only first COPY can be optimized?
This is true, and I don't think we should care, especially not if we're
going to take risks of incorrect behavior in order to optimize that
third-order case. The fact that we're dealing with this bug at all should
remind us that this stuff is harder than it looks. I want a simple,
reliable, back-patchable fix, and I do not believe that what you are
suggesting would be any of those.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (244+ messages) latest in thread
Message-ID: <22784.1436462863@sss.pgh.pa.us>
Permalink: ../22784.1436462863@sss.pgh.pa.us/
Also on: postgresql.org/message-id/22784.1436462863@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, masao.fujii@gmail.com, andres@anarazel.de, kleptog@svana.org
Subject: Re: WAL logging problem in 9.4.3?
In-Reply-To: <22784.1436462863@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox