pgsql: Embedded list interface

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Embedded list interface
Date: 2012-10-17 14:41:00
Message-ID: E1TOUns-0005yZ-5X@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2012-10-17 16:39:08 pgsql: Close un-owned SMgrRelations at transaction end.
Previous Message Simon Riggs 2012-10-17 09:30:02 pgsql: Fix typo in previous commit