pgsql: Redefine IsTransactionState() to only return true for

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Redefine IsTransactionState() to only return true for
Дата
Msg-id 20070607214600.5BADA9FB919@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Redefine IsTransactionState() to only return true for TRANS_INPROGRESS state,
which is the only state in which it's safe to initiate database queries.
It turns out that all but two of the callers thought that's what it meant;
and the other two were using it as a proxy for "will GetTopTransactionId()
return a nonzero XID"?  Since it was in fact an unreliable guide to that,
make those two just invoke GetTopTransactionId() always, then deal with a
zero result if they get one.

Modified Files:
--------------
    pgsql/src/backend/access/transam:
        xact.c (r1.244 -> r1.245)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c.diff?r1=1.244&r2=1.245)
    pgsql/src/backend/storage/ipc:
        procarray.c (r1.25 -> r1.26)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/procarray.c.diff?r1=1.25&r2=1.26)
    pgsql/src/backend/utils/error:
        elog.c (r1.185 -> r1.186)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/error/elog.c.diff?r1=1.185&r2=1.186)

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

Предыдущее
От: "Simon Riggs"
Дата:
Сообщение: Re: pgsql: Rework temp_tablespaces patch so that temptablespaces are
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Arrange for large sequential scans to synchronize with each