patch: prevent user from setting wal_buffers over 2GB bytes

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема patch: prevent user from setting wal_buffers over 2GB bytes
Дата
Msg-id 55BACC94.6040207@agliodbs.com
обсуждение исходный текст
Ответы Re: patch: prevent user from setting wal_buffers over 2GB bytes  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hackers,

In guc.c, the maximum for wal_buffers is INT_MAX.  However, wal_buffers
is actually measured in 8KB buffers, not in bytes.  This means that
users are able to set wal_buffers > 2GB.  When the database is started,
this can cause a core dump if the WAL offset is > 2GB.

Attached patch fixes this issue by lowering the maximum for wal_buffers:

josh@Radegast:~/pg94a$ bin/pg_ctl -D data start
server starting
josh@Radegast:~/pg94a$ LOG:  393216 is outside the valid range for
parameter "wal_buffers" (-1 .. 262143)
FATAL:  configuration file "/home/josh/pg94a/data/postgresql.conf"
contains errors

Thanks to Andrew Gierth for diagnosing this issue.

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: creating extension including dependencies
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );