Re: embedded list
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Andres Freund <andres@2ndquadrant.com>, pgsql-hackers@postgresql.org, Peter Geoghegan <peter@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2012-10-18T20:15:47Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes: > Here's the final version. I think this is ready to go in. I got around to reviewing this today. I'm pretty seriously annoyed at the definition of dlist_delete: it should *not* require the list header. The present coding simply throws away one of the primary advantages of a doubly-linked list over a singly-linked list, namely that you don't have to have your hands on the list header in order to unlink a node. This isn't merely academic either, as I see that the patch to catcache code actually added a field to struct catctup to support making the list header available. That's a complete waste of 8 bytes (on a 64-bit machine) per catalog cache entry. The only thing it buys for us is the ability to run dlist_check, which is something that isn't even compiled (not even in an Assert build), and which doesn't actually do that much useful even if it is compiled --- for instance, there's no way to verify that the nodes were actually in the list claimed. I think we should remove the head argument at least from dlist_delete, and probably also dlist_insert_after and dlist_insert_before. regards, tom lane
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Provide some static-assertion functionality on all compilers.
- 0d0aa5d29175 9.3.0 cited
-
Add infrastructure for compile-time assertions about variable types.
- ea473fb2dee7 9.3.0 cited
-
Remove 576 references of include files that were not needed.
- e0522505bd13 8.2.0 cited
-
More include file adjustments.
- b43ebe5f83b2 8.2.0 cited
-
Allow each C include file to compile on its own by including any needed
- b85a965f5fc7 8.2.0 cited