Re: Do not lock temp relations - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Do not lock temp relations
Date
Msg-id 1464449.1727708736@sss.pgh.pa.us
Whole thread Raw
In response to Do not lock temp relations  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Do not lock temp relations
Re: Do not lock temp relations
List pgsql-hackers
Maxim Orlov <orlovmg@gmail.com> writes:
> But for the second one: do we really need any lock for temp relations?

Yes.  Our implementation restrictions preclude access to the contents
of another session's temp tables, but it is not forbidden to do DDL
on them so long as no content access is required.  (Without this,
it'd be problematic for example to clean out a crashed session's temp
tables.  See the "orphan temporary tables" logic in autovacuum.c.)
You need fairly realistic locking to ensure that's OK.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: msys inet_pton strangeness
Next
From: Robert Haas
Date:
Subject: Re: pg_verifybackup: TAR format backup verification