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 Committers > pgsql: Fix an o...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 16256 of 18152
Post > Topic >>

pgsql: Fix an old corner-case bug in set_config_option: push_old_value

by tgl@[EMAIL PROTECTED] (Tom Lane) May 26, 2008 at 06:54 PM

Log Message:
-----------
Fix an old corner-case bug in set_config_option: push_old_value has to be
called before, not after, calling the assign_hook if any.  This is because
push_old_value might fail (due to palloc out-of-memory), and in that case
there would be no stack entry to tell transaction abort to undo the GUC
assignment.  Of course the actual assignment to the GUC variable hasn't
happened yet --- but the assign_hook might have altered subsidiary state.
Without a stack entry we won't call it again to make it undo such actions.
So this is necessary to make the world safe for assign_hooks with side
effects.  Per a discussion a couple weeks ago with Magnus.

Back-patch to 8.0.  7.x did not have the problem because it did not have
allocatable stacks of GUC values.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/misc:
        guc.c (r1.252.4.4 -> r1.252.4.5)
       
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.252.4.4&r2=1.252.4.5)

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




 1 Posts in Topic:
pgsql: Fix an old corner-case bug in set_config_option: push_old
tgl@[EMAIL PROTECTED] (T  2008-05-26 18:54:59 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Tue Dec 2 0:20:13 CST 2008.