Re: smgrsettransient mechanism is full of bugs
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Date: 2012-10-16T19:39:42Z
Lists: pgsql-hackers
Tom Lane wrote: > After further review, I have become convinced that in fact it's > completely broken and needs to be redone from scratch. The temp-file > marking at the fd.c level can easily get out of sync with the marking > at the smgr level, and that marking isn't too consistent with reality > either, which means we have all of the following problems: Oops. Sorry about this. Fortunately, as far as I can see, it only results in excessive resource consumption, not data corruption or loss. > I believe that we probably ought to revert this mechanism entirely, and > build a new implementation based on these concepts: > > * An SMgrRelation is transient if and only if it doesn't have an > "owning" relcache entry. Keep a list of all such SmgrRelations, and > close them all at transaction end. (Obviously, an SMgrRelation gets > removed from the list if it acquires an owner mid-transaction.) > > * There's no such concept as FD_XACT_TRANSIENT at the fd.c level. > Rather, we close and delete the VFD entry when told to by SmgrRelation > closure. Makes sense. It does seem simpler than the original approach. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use "transient" files for blind writes, take 2
- fba105b1099f 9.1.0 cited