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