Re: Commits 8de72b and 5457a1 (COPY FREEZE)
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: Simon Riggs <simon@2ndQuadrant.com>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@postgresql.org
Date: 2012-12-11T05:33:47Z
Lists: pgsql-hackers
On Mon, 2012-12-10 at 08:16 -0500, Stephen Frost wrote: > I'm trying to figure out why there are all the constraints around this > command to begin with. If we're going to support this, why do we > require the user to create or truncate the table in the same > transaction? Clearly that's going to reduce the usefulness of this > feature and it's not clear to me why that constraint is needed, > code-wise. There is a very specific reason: If you insert frozen tuples into a table that already has tuples in it, then you no longer have just an isolation issue, you have an *atomicity* issue (and probably a number of other serious issues) because you can't roll back. Doing it in the same transaction as the table was created leaves you with a way to roll back: just delete the table (which will happen implicitly because the creation is part of the same transaction anyway). Perhaps we can take some partial steps toward MVCC-safe access? For instance, how about trying to recheck the xmin of a pg_class tuple when starting a scan? Regards, Jeff Davis
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Keep rd_newRelfilenodeSubid across overflow.
- ae9aba69a860 9.3.0 cited
-
Reduce scope of changes for COPY FREEZE.
- 5457a130d3a6 9.3.0 cited
-
COPY FREEZE and mark committed on fresh tables.
- 8de72b66a2ed 9.3.0 cited