Re: patch: prevent user from setting wal_buffers over 2GB bytes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: prevent user from setting wal_buffers over 2GB bytes
Date: 2015-07-31 17:43:45
Message-ID: CA+Tgmob4Yj7KZszkjVHtkPX2HXQZf3WbXKW=KFg8+33F8QFR=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 30, 2015 at 9:17 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> 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.

Why does this cause a core dump? We could consider fixing whatever
the problem is rather than capping the value.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-07-31 17:57:00 Re: brin index vacuum versus transaction snapshots
Previous Message Robert Haas 2015-07-31 17:40:14 Re: Autonomous Transaction is back