Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables
Дата
Msg-id 8882.1204419061@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Список pgsql-hackers
I wrote:
> I think we need some better means of recording whether a lock is on a
> temp object.  We could certainly add a flag to the LOCALLOCK struct,
> but it's not clear where a clean place to set it would be.  As a rule
> we don't yet know when locking a relation whether it's temp or not.

Actually ... why are we using the lock manager to drive this at all?
Temp-ness of relations is not really something that it has any interest
in.  What if we get rid of LockTagIsTemp altogether, and instead protect
2PC transactions by having a global flag "transactionUsedTempTable"?
We could clear that at transaction start, and conditionally set it in
relation_open, for very little cost.

I think the idea behind the lock-manager approach was to avoid expending
any cycles at all on this consideration if you weren't using 2PC.  But
if we have to take special action to mark locks as temp when they are
taken, we certainly aren't going to beat a simple flag for performance.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Gurjeet Singh"
Дата:
Сообщение: Fwd: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables
Следующее
От: craigp
Дата:
Сообщение: newbie: renaming sequences task