Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > Re: Fairly seri...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 17 Topic 9348 of 11009
Post > Topic >>

Re: Fairly serious bug induced by latest guc enum changes

by magnus@[EMAIL PROTECTED] (Magnus Hagander) Jul 1, 2008 at 08:57 PM

Tom Lane wrote:
> Magnus Hagander <magnus@[EMAIL PROTECTED]
> writes:
>> Tom Lane wrote:
>>> Hmm ... or at least more or less fixed.  Seems like there's no
provision
>>> to close and reopen the file if enableFsync changes.  Not sure if
that's
>>> worth worrying about.
> 
>> We didn't have that before either, did we?
> 
> No, so I think it's a pre-existing bug.

Ok, at least I'm reading the code right.


>> We close it when the sync bit
>> changes, but not just if we change say between fsync() and fdatasync().
>> Is there any actual reason we'd want to close it?
> 
> The point is that if you turn the fsync GUC on or off while using a wal
> sync mode that requires supplying an option flag to open(), then really
> you ought to close the WAL file and re-open it with the new correct
> option flags.  The fact that we're not doing that implies that the
> effects of a change in fsync might not fully take effect until the next
> WAL segment is started.  Whether this is worth fixing isn't real clear.

What scenario does it actually happen in, though? Doesn't the check:
  if (get_sync_bit(sync_method) != get_sync_bit(new_sync_method))

take care of that? If the sync bit changed, we close the file?


Or are you talking about changing the variable "fsync"? If so, doesn't
"fsync=off" also change the behavior of other parts of the code, so it's
not just WAL, which means it'd be pretty unsafe *anyway* unless you
actually "sync" the disks, and not just fsync?

//Magnus


//Magnus

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 17 Posts in Topic:
Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-05-12 16:22:12 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-05-12 22:33:33 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-05-12 18:46:06 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-05-13 08:07:02 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-05-13 09:44:14 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-05-13 09:50:29 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-05-13 15:54:21 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-05-13 10:10:16 
Re: Fairly serious bug induced by latest guc enum
bruce@[EMAIL PROTECTED]   2008-06-30 16:29:48 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-06-30 16:41:12 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-07-01 20:06:00 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-07-01 14:51:21 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-07-01 20:57:38 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-07-01 15:07:21 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-07-01 21:10:34 
Re: Fairly serious bug induced by latest guc enum changes
tgl@[EMAIL PROTECTED] (T  2008-07-01 15:17:06 
Re: Fairly serious bug induced by latest guc enum changes
magnus@[EMAIL PROTECTED]   2008-07-02 14:11:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 7:51:39 CST 2008.