pgsql: Avoid assuming there will be only 3 states for synchronous_commi

Started by Simon Riggsalmost 15 years ago2 messages
#1Simon Riggs
simon@2ndQuadrant.com

Avoid assuming there will be only 3 states for synchronous_commit.
Also avoid hardcoding the current default state by giving it the name
"on" and replace with a meaningful name that reflects its behaviour.
Coding only, no change in behaviour.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/88f32b7ca29982f286b61a9d0dd29be4b8a01c25

Modified Files
--------------
src/backend/access/transam/xact.c | 2 +-
src/backend/postmaster/autovacuum.c | 2 +-
src/backend/utils/misc/guc.c | 2 +-
src/include/access/xact.h | 9 ++++++---
src/include/replication/syncrep.h | 2 +-
5 files changed, 10 insertions(+), 7 deletions(-)

#2Robert Haas
robertmhaas@gmail.com
In reply to: Simon Riggs (#1)
Re: [COMMITTERS] pgsql: Avoid assuming there will be only 3 states for synchronous_commi

On Mon, Apr 4, 2011 at 6:24 PM, Simon Riggs <simon@2ndquadrant.com> wrote:

Avoid assuming there will be only 3 states for synchronous_commit.
Also avoid hardcoding the current default state by giving it the name
"on" and replace with a meaningful name that reflects its behaviour.
Coding only, no change in behaviour.

I think changing the test to > SYNCHRONOUS_COMMIT_OFF is an
improvement, but I don't particularly like the renaming portion of
this change - now the internal names don't match what the user types,
which seems less clear, and inconsistent with every other enum-type
GUC.

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