From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); |
Date: | 2015-07-31 02:46:55 |
Message-ID: | CAB7nPqQ1gg-x9HR3TagJXktfUFhPZYP2=pJ6GCdj-AH=W_-c5A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 31, 2015 at 11:28 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>
>> @@ -57,7 +57,8 @@ static relopt_bool boolRelOpts[] =
>
> If we go through this list, I'd rather make informed decisions about
> each reloption. Otherwise we're going to get patches for each of them
> separately over the next versions.
Just dropping quickly a reply: I meant table relopts only, excluding
the index stuff for now regarding the isolation tests.
>> + AccessExclusiveLock
>> + foreach(cell, defList)
>> + {
>> + DefElem *def = (DefElem *) lfirst(cell);
>> + int i;
>> +
>> + for (i = 0; relOpts[i]; i++)
>> + {
>> + if (pg_strncasecmp(relOpts[i]->name, def->defname, relOpts[i]->namelen + 1) == 0)
>> + {
>> + if (lockmode < relOpts[i]->lockmode)
>> + lockmode = relOpts[i]->lockmode;
>> + }
>> + }
>> + }
>> +
>> + return lockmode;
>> +}
>
> We usually don't compare lock values that way, i.e. there's not
> guaranteed to be a strict monotonicity between lock levels. I don't
> really agree with that policy, but it's nonetheless there.
Yeah, there are some in lock.c but that's rather localized.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Fabrízio de Royes Mello | 2015-07-31 03:21:28 | Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); |
Previous Message | Fabrízio de Royes Mello | 2015-07-31 02:41:35 | Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); |