Robert Haas <[email protected]> writes:
> On Wed, Jul 3, 2013 at 10:47 AM, Tom Lane <[email protected]> wrote:
>> Are we somehow not going through ExecOpenIndices?

> I dunno.  I just did a quick black-box test:

> CREATE TABLE foo (a int primary key);
> BEGIN;
> INSERT INTO foo VALUES (1);
> SELECT relation::regclass, locktype, mode, granted FROM pg_locks;

> I get:

>  relation |   locktype    |       mode       | granted
> ----------+---------------+------------------+---------
>  pg_locks | relation      | AccessShareLock  | t
>  foo      | relation      | RowExclusiveLock | t
>           | virtualxid    | ExclusiveLock    | t
>           | transactionid | ExclusiveLock    | t

> No foo_pkey anywhere.

That proves nothing, as we don't keep such locks after the query
(and there's no reason to AFAICS).  See ExecCloseIndices.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to