Re: Commits 8de72b and 5457a1 (COPY FREEZE)
Noah Misch <noah@leadboat.com>
From: Noah Misch <noah@leadboat.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>, Jeff Davis <pgsql@j-davis.com>, Simon Riggs <simon@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2012-12-11T03:01:08Z
Lists: pgsql-hackers
Attachments
- sinval-newrelfilenode-v1.patch (text/plain) patch v1
On Mon, Dec 10, 2012 at 08:04:55PM -0500, Robert Haas wrote: > I think the current behavior, where we treat FREEZE as a hint, is just > awful. Regardless of whether the behavior is automatic or manually > requested, the idea that you might get the optimization or not > depending on the timing of relcache flushes seems very much > undesirable. I mean, if the optimization is actually important for > performance, then you want to get it when you ask for it. If it > isn't, then why bother having it at all? Let's say that COPY FREEZE > normally doubles performance on a data load that therefore takes 8 > hours - somebody who suddenly loses that benefit because of a relcache > flush that they can't prevent or control and ends up with a 16 hour > data load is going to pop a gasket. Until these threads, I did not know that a relcache invalidation could trip up the WAL avoidance optimization, and now this. I poked at the relevant relcache.c code, and it already takes pains to preserve the needed facts. The header comment of RelationCacheInvalidate() indicates that entries bearing an rd_newRelfilenodeSubid can safely survive the invalidation, but the code does not implement that. I think the comment is right, and this is just an oversight in the code going back to its beginning (fba8113c). I doubt the comment at the declaration of rd_createSubid in rel.h, though I can't presently say what correct comment should replace it. CLUSTER does preserve the old value, at least for the main table relation. CLUSTER probably should *set* rd_newRelfilenodeSubid. Thanks, nm
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