Re: Temporary tables versus wraparound... again - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Temporary tables versus wraparound... again
Date
Msg-id CA+TgmoYWd+OLrHcZYjsKTTjb85VCw01O_Akh5Z63yuxx7PQMEw@mail.gmail.com
Whole thread Raw
In response to Re: Temporary tables versus wraparound... again  (Greg Stark <stark@mit.edu>)
Responses Re: Temporary tables versus wraparound... again  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Wed, Dec 14, 2022 at 1:18 PM Greg Stark <stark@mit.edu> wrote:
> So I don't see any evidence we skip any locking on pg_class when doing
> updates on rows for temporary tables.

I don't know what this means. You don't have to lock pg_class to
update rows in any table, whether temporary or otherwise.

You do have to lock a table in order to update its pg_class row,
though, whether the table is temporary or not. Otherwise, another
session could drop it while you're doing something with it, after
which bad things would happen.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: allow granting CLUSTER, REFRESH MATERIALIZED VIEW, and REINDEX
Next
From: Greg Stark
Date:
Subject: Re: Temporary tables versus wraparound... again