pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Greg Smith <greg@2ndquadrant.com>
Cc: Fujii Masao <masao.fujii@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: auto-sizing wal_buffers
Date: Sat, 22 Jan 2011 21:08:22 -0500
Message-ID: <202.1295748502@sss.pgh.pa.us> (raw )
In-Reply-To: <AANLkTi=7ZVAD+iDm9RTgg-XiZWU47_dBo9Ev6Xvrwf3_@mail.gmail.com >
References: <AANLkTik3mZ3sTfbHQW-1B44NRMkUzRsMnPb8g-HtttVv@mail.gmail.com >
<AANLkTimQ3+osgAEH4meS97FmLN-4evSTS2W6fctov=jY@mail.gmail.com >
<AANLkTinhU9EEPGM29S+KH=qK4t-mLhBBNAaLCGQSx-4y@mail.gmail.com >
<20767.1294964709@sss.pgh.pa.us >
<4D314406.3000703@2ndquadrant.com >
<AANLkTikoUWemGmAmNGHXW8QQoo45sLxzr-aU=rUwshba@mail.gmail.com >
<4D31D0E4.9000108@2ndquadrant.com >
<AANLkTikpeVE-XMZL4L4Mi4zUd7S-D1JckO97_wjp8t3M@mail.gmail.com >
<11561.1295742146@sss.pgh.pa.us >
<29279.1295746434@sss.pgh.pa.us >
<AANLkTin93Pfat3RX9u1zWdnZMraQdTzRPC3kE__BUaiD@mail.gmail.com >
<AANLkTi=7ZVAD+iDm9RTgg-XiZWU47_dBo9Ev6Xvrwf3_@mail.gmail.com >
Robert Haas <robertmhaas@gmail.com> writes:
> This is certainly shorter than I wrote, which is good, but it strikes
> me that the fundamental problem here is that the API for an assign
> hook is fundamentally different for strings than it is for other data
> types.
I agree that that's annoying, but given that strings are pass-by-ref
while the other GUC variable types are pass-by-value, it's not really
very easy to make them alike.
In any case, it's not too relevant to this patch, because an assign hook
cannot solve this problem. As someone (I think you) pointed out
upthread, an assign hook would only be useful if we were sure
wal_buffers would in fact be assigned to by the config file, and that
that would happen after shared_buffers acquired its final value. Since
we can't assume either thing, the right way to approach it is to have an
internal action that assigns a fresh value to wal_buffers after all the
configuration processing is complete. Greg had the right design but
didn't know how to change a GUC setting properly. There are a bunch of
other hacks^Wfeatures that work similarly --- look around for
SetConfigOption calls.
regards, tom lane
view thread (37+ messages) latest in thread
Message-ID: <202.1295748502@sss.pgh.pa.us>
Permalink: ../202.1295748502@sss.pgh.pa.us/
Also on: postgresql.org/message-id/202.1295748502@sss.pgh.pa.us
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, greg@2ndquadrant.com, masao.fujii@gmail.com, magnus@hagander.net
Subject: Re: auto-sizing wal_buffers
In-Reply-To: <202.1295748502@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox