Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );
От | Fabrízio de Royes Mello |
---|---|
Тема | Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); |
Дата | |
Msg-id | CAFcNs+peDv8Ki76jm0N19-kupQ2_N1_6BYCF2uVOXNQBYgi6Qw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); (Alvaro Herrera <alvherre@2ndquadrant.com>) |
Ответы |
Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET (
.. );
|
Список | pgsql-hackers |
<div dir="ltr"><div class="gmail_extra"><br />On Tue, Apr 7, 2015 at 10:15 PM, Alvaro Herrera <<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>wrote:<br />><br />> Fabrízio de Royes Mellowrote:<br />> > On Mon, Apr 6, 2015 at 12:53 AM, Alvaro Herrera <<a href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>><br/>> > wrote:<br />> > ><br />>> > Fabrízio de Royes Mello wrote:<br />> > ><br />> > > > Ok guys. The attached patch refactorthe reloptions adding a new field<br />> > > > "lockmode" in "relopt_gen" struct and a new method todetermine the<br />> > > > required lock level from an option list.<br />> > > ><br />> >> > We need determine the appropriate lock level for each reloption:<br />> > ><br />> > > Idon't think AccessShareLock is appropriate for any option change. You<br />> > > should be using a lock levelthat's self-conflicting, as a minimum<br />> > > requirement, to avoid two processes changing the value concurrently.<br/>> ><br />> > What locklevel do you suggest? Maybe ShareLock?<br />><br />> ShareUpdateExclusiveprobably. ShareLock doesn't conflict with itself.<br />><br /><br /></div><div class="gmail_extra">Ok.<br/><br /></div><div class="gmail_extra"><br />> > > (I would probably go as far as ensuringthat the lock level specified in<br />> > > the table DoLockModesConflict() with itself in an Assert somewhere.)<br/>> ><br />> > If I understood this is to check if the locklevel of the reloption list<br />>> don't conflict one each other, is it?<br />><br />> I mean<br />> Assert(DoLockModesConflict(relopt_gen->locklevel,relopt_gen->locklevel));<br />><br /><br /></div><div class="gmail_extra">Understood...IMHO the better place to perform this assert is in "initialize_reloptions".<br /></div><divclass="gmail_extra"><br /></div><div class="gmail_extra">Thoughts?<br /><br /></div><div class="gmail_extra">--<br/>Fabrízio de Royes Mello<br />Consultoria/Coaching PostgreSQL<br />>> Timbira: <a href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/>>> Blog: <a href="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br/>>> Linkedin: <a href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/>>> Github: <a href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div></div>
В списке pgsql-hackers по дате отправления: