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 > Fairly serious ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 17 Topic 9348 of 9638
Post > Topic >>

Fairly serious bug induced by latest guc enum changes

by tgl@[EMAIL PROTECTED] (Tom Lane) May 12, 2008 at 04:22 PM

I see that assign_xlog_sync_method() is still assigning to sync_method.
This is 100% wrong: an assign hook is chartered to set derived values,
but not to set the GUC variable itself.  This will for example result
in set_config_option() stacking the wrong value (the already-updated
one) as the value to roll back to if the transaction aborts.

You could just remove the assignment from assign_xlog_sync_method,
although it might look a bit odd to be setting open_sync_bit but
not sync_method.  It also bothers me slightly that the derived and
main values wouldn't be set at exactly the same point --- problems
inside guc.c might lead to them getting out of sync.

Another possibility is to stick with something equivalent to the former
design: what GUC thinks is the variable is just a dummy static integer
in guc.c, and the assign hook is still setting the "real" value that the
rest of the code looks at.  A minor advantage of this second way is that
the "real" value could still be declared as enum rather than int.

Please fix this, and take another look at the prior WAL enum changes
to see if the same problem hasn't been created elsewhere.

			regards, tom lane

-- 
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
tan13V112 Sun Jul 6 18:34:01 CDT 2008.