pgsql: Clean up the representation of special snapshots by including a

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Clean up the representation of special snapshots by including a
Дата
Msg-id 20070325194514.F301D9FB3B2@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Clean up the representation of special snapshots by including a "method
pointer" in every Snapshot struct.  This allows removal of the case-by-case
tests in HeapTupleSatisfiesVisibility, which should make it a bit faster
(I didn't try any performance tests though).  More importantly, we are no
longer violating portable C practices by assuming that small integers are
distinct from all pointer values, and HeapTupleSatisfiesDirty no longer
has a non-reentrant API involving side-effects on a global variable.

There were a couple of places calling HeapTupleSatisfiesXXX routines
directly rather than through the HeapTupleSatisfiesVisibility macro.
Since these places had to be changed anyway, I chose to make them go
through the macro for uniformity.

Along the way I renamed HeapTupleSatisfiesSnapshot to HeapTupleSatisfiesMVCC
to emphasize that it's only used with MVCC-type snapshots.  I was sorely
tempted to rename HeapTupleSatisfiesVisibility to HeapTupleSatisfiesSnapshot,
but forebore for the moment to avoid confusion and reduce the likelihood that
this patch breaks some of the pending patches.  Might want to reconsider
doing that later.

Modified Files:
--------------
    pgsql/contrib/pgstattuple:
        pgstattuple.c (r1.25 -> r1.26)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/pgstattuple/pgstattuple.c.diff?r1=1.25&r2=1.26)
    pgsql/src/backend/access/heap:
        heapam.c (r1.228 -> r1.229)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c.diff?r1=1.228&r2=1.229)
    pgsql/src/backend/access/nbtree:
        nbtinsert.c (r1.154 -> r1.155)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtinsert.c.diff?r1=1.154&r2=1.155)
    pgsql/src/backend/catalog:
        catalog.c (r1.69 -> r1.70)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/catalog.c.diff?r1=1.69&r2=1.70)
        index.c (r1.280 -> r1.281)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c.diff?r1=1.280&r2=1.281)
    pgsql/src/backend/executor:
        execMain.c (r1.290 -> r1.291)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execMain.c.diff?r1=1.290&r2=1.291)
    pgsql/src/backend/storage/ipc:
        procarray.c (r1.22 -> r1.23)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/procarray.c.diff?r1=1.22&r2=1.23)
    pgsql/src/backend/utils/adt:
        ri_triggers.c (r1.92 -> r1.93)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ri_triggers.c.diff?r1=1.92&r2=1.93)
    pgsql/src/backend/utils/time:
        tqual.c (r1.101 -> r1.102)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/time/tqual.c.diff?r1=1.101&r2=1.102)
    pgsql/src/include/utils:
        tqual.h (r1.65 -> r1.66)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/tqual.h.diff?r1=1.65&r2=1.66)

В списке pgsql-committers по дате отправления:

Предыдущее
От: ishii@postgresql.org (Tatsuo Ishii)
Дата:
Сообщение: pgsql: Add new encoding EUC_JIS_2004 and SHIFT_JIS_2004, along with new
Следующее
От: korryd@pgfoundry.org (User Korryd)
Дата:
Сообщение: pg-migrator - src: FB#6530 - switching to FirstNormalObjectId instead of