Re: Commits 8de72b and 5457a1 (COPY FREEZE) - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Commits 8de72b and 5457a1 (COPY FREEZE)
Date
Msg-id CA+U5nML_F7qPDD5vPSQG6k8mjsmQCG4bKwq88tVn=-J6iN65KQ@mail.gmail.com
Whole thread Raw
In response to Commits 8de72b and 5457a1 (COPY FREEZE)  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: Commits 8de72b and 5457a1 (COPY FREEZE)
List pgsql-hackers
On 4 December 2012 01:34, Jeff Davis <pgsql@j-davis.com> wrote:
>I assume that refers to the discussion here:
>
> http://archives.postgresql.org/pgsql-hackers/2012-02/msg01177.php
>
> But that was quite a while ago, so is there a more recent discussion
> that prompted this commit now?

Yes, this was discussed within the last month, thread "TRUNCATE SERIALIZABLE..."

The patch for that was already posted, so I committed it.

> I am a little confused about the case where setting HEAP_XMIN_COMMITTED
> when loading the table in the same transaction is wrong. There was some
> discussion about subtransactions, but those problems only seemed to
> appear when the CREATE and the INSERT/COPY happened in different
> subtransactions.
>
> So, I guess my question is, why the partial revert?

Well, first, because I realised that it wasn't wanted. I was
re-reading the threads trying to figure out a way to help the checksum
patch further.

Second, because I realised why it wasn't wanted. Setting
HEAP_XMIN_COMMITTED causes MVCC violations within the transaction
issuing the COPY. Accepting the MVCC violation requires explicit
consent from user. If we have that, we may as well set everything we
can. So there's no middle ground. Nothing, or all frozen. We could
change that, but it would require some complex tweaks to tqual
routines, which I tried and was not happy with, since they would need
to get more complex. It's possible a route through that minefield
exists. I'm inclined to believe other approaches are more likely to
yield benefit.

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



pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: support for LDAP URLs
Next
From: Andres Freund
Date:
Subject: Re: support for LDAP URLs