Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fabrízio Mello <fabriziomello(at)gmail(dot)com>
Cc: 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-24 07:05:19
Message-ID: CAB7nPqQgs3Qji1HqQggfuQNZUKdmtc2BBgTJFw2stwn-umxUjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 24, 2015 at 7:11 AM, Fabrízio de Royes Mello
<fabriziomello(at)gmail(dot)com> wrote:
> On Thu, Jul 2, 2015 at 2:03 PM, Simon Riggs <simon(at)2ndquadrant(dot)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(dot)GB3969106(at)tornado(dot)leadboat(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ildus Kurbangaliev 2015-07-24 07:42:05 Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Previous Message Kouhei Kaigai 2015-07-24 07:03:35 Re: Asynchronous execution on FDW