pgsql: Embedded list interface - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Embedded list interface
Date
Msg-id E1TOUns-0005yZ-5X@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Embedded list interface

Provide a common implementation of embedded singly-linked and
doubly-linked lists.  "Embedded" in the sense that the nodes'
next/previous pointers exist within some larger struct; this design
choice reduces memory allocation overhead.

Most of the implementation uses inlineable functions (where supported),
for performance.

Some existing uses of both types of lists have been converted to the new
code, for demonstration purposes.  Other uses can (and probably will) be
converted in the future.  Since dllist.c is unused after this conversion,
it has been removed.

Author: Andres Freund
Some tweaks by me
Reviewed by Tom Lane, Peter Geoghegan

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a66ee69add6e129c7674a59f8c3ba010ed4c9386

Modified Files
--------------
src/backend/lib/Makefile            |    2 +-
src/backend/lib/dllist.c            |  214 ----------
src/backend/lib/ilist.c             |  109 +++++
src/backend/postmaster/autovacuum.c |  214 +++++------
src/backend/postmaster/postmaster.c |   57 ++--
src/backend/utils/cache/catcache.c  |  142 ++++----
src/include/lib/dllist.h            |   85 ----
src/include/lib/ilist.h             |  767 +++++++++++++++++++++++++++++++++++
src/include/utils/catcache.h        |   19 +-
9 files changed, 1079 insertions(+), 530 deletions(-)


pgsql-committers by date:

Previous
From: Simon Riggs
Date:
Subject: pgsql: Fix typo in previous commit
Next
From: Tom Lane
Date:
Subject: pgsql: Close un-owned SMgrRelations at transaction end.