pgsql: Repair two places where SIGTERM exit could leave shared memory

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Repair two places where SIGTERM exit could leave shared memory
Дата
Msg-id 20080417000001.41B807559CD@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Repair two places where SIGTERM exit could leave shared memory state
corrupted.  (Neither is very important if SIGTERM is used to shut down the
whole database cluster together, but there's a problem if someone tries to
SIGTERM individual backends.)  To do this, introduce new infrastructure
macros PG_ENSURE_ERROR_CLEANUP/PG_END_ENSURE_ERROR_CLEANUP that take care
of transiently pushing an on_shmem_exit cleanup hook.  Also use this method
for createdb cleanup --- that wasn't a shared-memory-corruption problem,
but SIGTERM abort of createdb could leave orphaned files lying around.

Backpatch as far as 8.2.  The shmem corruption cases don't exist in 8.1,
and the createdb usage doesn't seem important enough to risk backpatching
further.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/access/nbtree:
        nbtree.c (r1.153 -> r1.153.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtree.c?r1=1.153&r2=1.153.2.1)
        nbtutils.c (r1.79.2.1 -> r1.79.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtutils.c?r1=1.79.2.1&r2=1.79.2.2)
    pgsql/src/backend/access/transam:
        xlog.c (r1.258.2.2 -> r1.258.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.258.2.2&r2=1.258.2.3)
    pgsql/src/backend/commands:
        dbcommands.c (r1.187.2.2 -> r1.187.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c?r1=1.187.2.2&r2=1.187.2.3)
    pgsql/src/backend/port:
        ipc_test.c (r1.21 -> r1.21.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/port/ipc_test.c?r1=1.21&r2=1.21.2.1)
    pgsql/src/backend/storage/ipc:
        ipc.c (r1.94 -> r1.94.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/ipc.c?r1=1.94&r2=1.94.2.1)
    pgsql/src/include/access:
        nbtree.h (r1.106 -> r1.106.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/nbtree.h?r1=1.106&r2=1.106.2.1)
    pgsql/src/include/storage:
        ipc.h (r1.72 -> r1.72.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/ipc.h?r1=1.72&r2=1.72.2.1)
    pgsql/src/include/utils:
        elog.h (r1.82 -> r1.82.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/elog.h?r1=1.82&r2=1.82.2.1)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Repair two places where SIGTERM exit could leave shared memory
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Add some code to EXPLAIN to show the targetlist (ie, output