Re: INSERT ... ON CONFLICT UPDATE and logical decoding - Mailing list pgsql-hackers

From Andres Freund
Subject Re: INSERT ... ON CONFLICT UPDATE and logical decoding
Date
Msg-id 20150220235216.GI12653@awork2.anarazel.de
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT UPDATE and logical decoding  (Peter Geoghegan <pg@heroku.com>)
Responses Re: INSERT ... ON CONFLICT UPDATE and logical decoding  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 2015-02-20 15:44:12 -0800, Peter Geoghegan wrote:
> On Thu, Feb 19, 2015 at 2:11 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > Yes. It'd be easiest if the only the final insert/update were actually
> > WAL logged as full actions.
> 
> Well, that implies that we'd actually know that we'd succeed when WAL
> logging the speculative heap tuple's insertion.

I don't think it does. It'd certainly be possible to simply only emit
the final WAL logging action once the insertion has actually
non-speculatively succeeded.  We might decide against that for
eefficiency or complexity reasons, but it'd be far from impossible or
even ugly.  We could even not log the actual values for the speculative
insertion - after all, those aren't needed if we crash halfway
through...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT UPDATE and logical decoding
Next
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT UPDATE and logical decoding