Re: relation ### modified while in use - Mailing list pgsql-hackers

From Tom Lane
Subject Re: relation ### modified while in use
Date
Msg-id 8746.972315473@sss.pgh.pa.us
Whole thread Raw
In response to Re: relation ### modified while in use  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> Only slightly; one interpretation of a table lock is that it locks all of
> the data in the table; and a lock on the pg_class row locks the metadata. I
> must admit that I am having a little difficulty thinking of a case where
> the distinction would be useful...

I can't see any value in locking the data without locking the metadata.
Given that, the other way round is sort of moot...

> So where do
>     SELECT FOR UPDATE IN ROW SHARE MODE 

We don't support that (never heard of it before, in fact)

> and 
>     LOCK TABLE IN ROW EXCLUSIVE MODE statements. 
> fit in? 

That one is just a table lock (RowExclusiveLock).  All the variants
of LOCK TABLE are table-level locks.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: question about new fmgr in 7.1 snapshots
Next
From: Tom Lane
Date:
Subject: Re: AW: AW: relation ### modified while in use