pgsql: Make some simple performance improvements in

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Make some simple performance improvements in
Дата
Msg-id 20070921173653.7203B753E4C@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Make some simple performance improvements in TransactionIdIsInProgress().
For XIDs of our own transaction and subtransactions, it's cheaper to ask
TransactionIdIsCurrentTransactionId() than to look in shared memory.
Also, the xids[] work array is always the same size within any given
process, so malloc it just once instead of doing a palloc/pfree on every
call; aside from being faster this lets us get rid of some goto's, since
we no longer have any end-of-function pfree to do.  Both ideas by Heikki.

Modified Files:
--------------
    pgsql/src/backend/storage/ipc:
        procarray.c (r1.33 -> r1.34)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/procarray.c?r1=1.33&r2=1.34)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix comments that misspelled TransactionIdIsInProgress, per
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Change tqual.c tests to use !TransactionIdIsCurrentTransactionId,