pgsql: Convert wal_sync_method to guc enum.

Started by Nonameover 17 years ago6 messages
#1Noname
mha@postgresql.org

Log Message:
-----------
Convert wal_sync_method to guc enum.

Modified Files:
--------------
pgsql/src/backend/access/transam:
xlog.c (r1.303 -> r1.304)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.303&r2=1.304)
pgsql/src/backend/utils/misc:
guc.c (r1.452 -> r1.453)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.452&r2=1.453)
pgsql/src/include/access:
xlog.h (r1.87 -> r1.88)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.87&r2=1.88)
xlogdefs.h (r1.19 -> r1.20)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlogdefs.h?r1=1.19&r2=1.20)
pgsql/src/include/utils:
guc.h (r1.94 -> r1.95)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc.h?r1=1.94&r2=1.95)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: pgsql: Convert wal_sync_method to guc enum.

mha@postgresql.org (Magnus Hagander) writes:

Convert wal_sync_method to guc enum.

Buildfarm says you broke things for Windows.

regards, tom lane

#3Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#2)
Re: pgsql: Convert wal_sync_method to guc enum.

Tom Lane wrote:

mha@postgresql.org (Magnus Hagander) writes:

Convert wal_sync_method to guc enum.

Buildfarm says you broke things for Windows.

Yeah, working on that with Dave. First part was to unbreak the error
message so we can actually figure out what's broken :-(

//Magnus

#4Magnus Hagander
magnus@hagander.net
In reply to: Magnus Hagander (#3)
Re: [COMMITTERS] pgsql: Convert wal_sync_method to guc enum.

Magnus Hagander wrote:

Tom Lane wrote:

mha@postgresql.org (Magnus Hagander) writes:

Convert wal_sync_method to guc enum.

Buildfarm says you broke things for Windows.

Yeah, working on that with Dave. First part was to unbreak the error
message so we can actually figure out what's broken :-(

I need to leave for a couple of hours, will look again when I get back.
But so far, I'm quite surprised. Here's my reasoning, please poke holes
in it :-)

1) Win32 always defines O_DSYNC (win32.h)
2) That means we should always define OPEN_DATASYNC_FLAG (xlogdefs.h,
line 107)
3) That means that the error should not happen at all, because of
xlog.c line 6358.

Anybody who can kill this argument before I get back ;-) It's obviously
flawed somewhere...

//Magnus

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#4)
Re: [COMMITTERS] pgsql: Convert wal_sync_method to guc enum.

Magnus Hagander <magnus@hagander.net> writes:

I need to leave for a couple of hours, will look again when I get back.
But so far, I'm quite surprised. Here's my reasoning, please poke holes
in it :-)

I think you forgot to handle SYNC_METHOD_OPEN_DSYNC in issue_xlog_fsync.
If you are going to split SYNC_METHOD_OPEN into two codes, you need to
handle both those codes everywhere SYNC_METHOD_OPEN was formerly
referenced ...

regards, tom lane

#6Magnus Hagander
magnus@hagander.net
In reply to: Tom Lane (#5)
Re: [COMMITTERS] pgsql: Convert wal_sync_method to guc enum.

Tom Lane wrote:

Magnus Hagander <magnus@hagander.net> writes:

I need to leave for a couple of hours, will look again when I get
back. But so far, I'm quite surprised. Here's my reasoning, please
poke holes in it :-)

I think you forgot to handle SYNC_METHOD_OPEN_DSYNC in
issue_xlog_fsync. If you are going to split SYNC_METHOD_OPEN into two
codes, you need to handle both those codes everywhere
SYNC_METHOD_OPEN was formerly referenced ...

That was it, fixed. I missed the fact that the same error message
occured twice in the file.

I blame lack of caffeine comined with having hacked Latex code. It just
kills the brain.

Thanks for the pointer!

//Magnus