Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. ); - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );
Date
Msg-id CAB7nPqQgs3Qji1HqQggfuQNZUKdmtc2BBgTJFw2stwn-umxUjQ@mail.gmail.com
Whole thread Raw
In response to Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
Responses Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers
On Fri, Jul 24, 2015 at 7:11 AM, Fabrízio de Royes Mello
<fabriziomello@gmail.com> wrote:
> On Thu, Jul 2, 2015 at 2:03 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> Looks functionally complete
>>
>> Need a test to show that ALTER TABLE works on views, as discussed on this
>> thread. And confirmation that pg_dump is not broken by this.
>>
>> Message-ID:     20140321205828.GB3969106@tornado.leadboat.com
>>
>
> Added more test cases to cover ALTER TABLE on views.
>
> I'm thinking about the isolation tests, what about add another 'alter-table'
> spec for isolation tests enabling and disabling 'autovacuum' options?

Yes, please.

> I did some tests using ALTER TABLE on views and also ALTER VIEW and I didn't
> identify any anomalies.
>
>> Needs documentation
>>
>
> Added.
       for (i = 0; boolRelOpts[i].gen.name; i++)
+       {
+
Assert(DoLockModesConflict(boolRelOpts[i].gen.lockmode,
boolRelOpts[i].gen.lockmode));               j++;
+       }       for (i = 0; intRelOpts[i].gen.name; i++)
+       {
+               Assert(DoLockModesConflict(intRelOpts[i].gen.lockmode,
intRelOpts[i].gen.lockmode));               j++;
+       }       for (i = 0; realRelOpts[i].gen.name; i++)
+       {
+
Assert(DoLockModesConflict(realRelOpts[i].gen.lockmode,
realRelOpts[i].gen.lockmode));               j++;
+       }       for (i = 0; stringRelOpts[i].gen.name; i++)
+       {
+
Assert(DoLockModesConflict(stringRelOpts[i].gen.lockmode,
stringRelOpts[i].gen.lockmode));               j++;
+       }
Splitting those long lines into two will avoid some work for pgindent.

+GetRelOptionsLockLevel(List *defList)
+{
+       LOCKMODE    lockmode = NoLock;
Shouldn't this default to AccessExclusiveLock instead of NoLock?
--
Michael



pgsql-hackers by date:

Previous
From: Laurent Laborde
Date:
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Next
From: Kouhei Kaigai
Date:
Subject: Re: Asynchronous execution on FDW