From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com> |
Subject: | Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} |
Date: | 2014-10-01 11:30:47 |
Message-ID: | 20141001113047.GE2084@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-09-26 16:19:33 -0700, Peter Geoghegan wrote:
> On Fri, Sep 26, 2014 at 3:25 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> > On Fri, Sep 26, 2014 at 3:11 PM, Alvaro Herrera
> > <alvherre(at)2ndquadrant(dot)com> wrote:
> >> FWIW there are 28 callers of HeapTupleHeaderGetXmin.
>
> > Don't forget about direct callers to HeapTupleHeaderGetRawXmin(),
> > though. There are plenty of those in tqual.c.
>
> Which reminds me: commit 37484ad2 added the opportunistic freezing
> stuff. To quote the commit message:
>
> """
> Instead of changing the tuple xmin to FrozenTransactionId, the combination
> of HEAP_XMIN_COMMITTED and HEAP_XMIN_INVALID, which were previously never
> set together, is now defined as HEAP_XMIN_FROZEN. A variety of previous
> proposals to freeze tuples opportunistically before vacuum_freeze_min_age
> is reached have foundered on the objection that replacing xmin by
> FrozenTransactionId might hinder debugging efforts when things in this
> area go awry; this patch is intended to solve that problem by keeping
> the XID around (but largely ignoring the value to which it is set).
>
> """
>
> Why wouldn't the same objection (the objection that the earlier
> opportunistic freezing ideas stalled on) apply to directly setting
> tuple xmin to InvalidTransactionId?
Because it's pretty much unrelated? The FrozenTransactionId bit you
reference is about tuples that actually survive, which isn't the case
here.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2014-10-01 11:34:27 | Promise index tuples for UPSERT |
Previous Message | Simon Riggs | 2014-10-01 11:23:34 | Re: "Value locking" Wiki page |