pgsql: Implement lazy XID allocation: transactions that do not modify - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Implement lazy XID allocation: transactions that do not modify
Date
Msg-id 20070905181048.B008B754201@cvs.postgresql.org
Whole thread Raw
Responses Re: pgsql: Implement lazy XID allocation: transactions that do not modify
List pgsql-committers
Log Message:
-----------
Implement lazy XID allocation: transactions that do not modify any database
rows will normally never obtain an XID at all.  We already did things this way
for subtransactions, but this patch extends the concept to top-level
transactions.  In applications where there are lots of short read-only
transactions, this should improve performance noticeably; not so much from
removal of the actual XID-assignments, as from reduction of overhead that's
driven by the rate of XID consumption.  We add a concept of a "virtual
transaction ID" so that active transactions can be uniquely identified even
if they don't have a regular XID.  This is a much lighter-weight concept:
uniqueness of VXIDs is only guaranteed over the short term, and no on-disk
record is made about them.

Florian Pflug, with some editorialization by Tom.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        catalogs.sgml (r2.156 -> r2.157)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/catalogs.sgml?r1=2.156&r2=2.157)
        config.sgml (r1.141 -> r1.142)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?r1=1.141&r2=1.142)
    pgsql/src/backend/access/heap:
        heapam.c (r1.237 -> r1.238)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c?r1=1.237&r2=1.238)
    pgsql/src/backend/access/transam:
        README (r1.6 -> r1.7)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/README?r1=1.6&r2=1.7)
        clog.c (r1.43 -> r1.44)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/clog.c?r1=1.43&r2=1.44)
        multixact.c (r1.24 -> r1.25)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/multixact.c?r1=1.24&r2=1.25)
        twophase.c (r1.32 -> r1.33)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/twophase.c?r1=1.32&r2=1.33)
        xact.c (r1.247 -> r1.248)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c?r1=1.247&r2=1.248)
        xlog.c (r1.279 -> r1.280)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.279&r2=1.280)
    pgsql/src/backend/catalog:
        system_views.sql (r1.41 -> r1.42)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/system_views.sql?r1=1.41&r2=1.42)
    pgsql/src/backend/commands:
        indexcmds.c (r1.162 -> r1.163)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/indexcmds.c?r1=1.162&r2=1.163)
        sequence.c (r1.143 -> r1.144)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/sequence.c?r1=1.143&r2=1.144)
        vacuum.c (r1.355 -> r1.356)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c?r1=1.355&r2=1.356)
        vacuumlazy.c (r1.90 -> r1.91)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuumlazy.c?r1=1.90&r2=1.91)
    pgsql/src/backend/storage/ipc:
        procarray.c (r1.28 -> r1.29)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/procarray.c?r1=1.28&r2=1.29)
        sinvaladt.c (r1.63 -> r1.64)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/sinvaladt.c?r1=1.63&r2=1.64)
    pgsql/src/backend/storage/lmgr:
        lmgr.c (r1.92 -> r1.93)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lmgr.c?r1=1.92&r2=1.93)
        lock.c (r1.177 -> r1.178)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lock.c?r1=1.177&r2=1.178)
        proc.c (r1.192 -> r1.193)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c?r1=1.192&r2=1.193)
    pgsql/src/backend/storage/smgr:
        smgr.c (r1.105 -> r1.106)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/smgr/smgr.c?r1=1.105&r2=1.106)
    pgsql/src/backend/utils/adt:
        lockfuncs.c (r1.28 -> r1.29)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/lockfuncs.c?r1=1.28&r2=1.29)
    pgsql/src/backend/utils/error:
        elog.c (r1.195 -> r1.196)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c?r1=1.195&r2=1.196)
    pgsql/src/backend/utils/misc:
        postgresql.conf.sample (r1.225 -> r1.226)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample?r1=1.225&r2=1.226)
    pgsql/src/include/access:
        xact.h (r1.88 -> r1.89)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xact.h?r1=1.88&r2=1.89)
        xlog.h (r1.82 -> r1.83)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.82&r2=1.83)
    pgsql/src/include:
        c.h (r1.220 -> r1.221)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h?r1=1.220&r2=1.221)
    pgsql/src/include/catalog:
        catversion.h (r1.422 -> r1.423)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.422&r2=1.423)
    pgsql/src/include/storage:
        lmgr.h (r1.58 -> r1.59)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lmgr.h?r1=1.58&r2=1.59)
        lock.h (r1.106 -> r1.107)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lock.h?r1=1.106&r2=1.107)
        proc.h (r1.99 -> r1.100)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/proc.h?r1=1.99&r2=1.100)
        procarray.h (r1.14 -> r1.15)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/procarray.h?r1=1.14&r2=1.15)
        sinvaladt.h (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/sinvaladt.h?r1=1.42&r2=1.43)
        smgr.h (r1.58 -> r1.59)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/smgr.h?r1=1.58&r2=1.59)
    pgsql/src/test/regress/expected:
        rules.out (r1.131 -> r1.132)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/rules.out?r1=1.131&r2=1.132)

pgsql-committers by date:

Previous
From: h-saito@pgfoundry.org (User H-saito)
Date:
Subject: psqlodbc - psqlodbc: Prep Ver 08.02.0500.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Quick hack to make the VXID of a prepared transaction be -1/XID,