Simplify set of flags used by MyXactFlags

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Simplify set of flags used by MyXactFlags
Дата
Msg-id 20190118053126.GH1883@paquier.xyz
обсуждение исходный текст
Ответы Re: Simplify set of flags used by MyXactFlags  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi all,

c5660e0 has introduced a new flag for MyXactFlags to restrict
two-phase commit from working with temporary objects, and as a matter
of fact XACT_FLAGS_ACCESSEDTEMPREL has been kept around to keep the
error handling message compatible with past versions, still it is
weird to keep both ACCESSEDTEMPNAMESPACE and ACCESSEDTEMPREL as the
former implies the latter, so attached is a cleanup patch for HEAD.

Keeping both messages makes the error handling at PREPARE time perhaps
a bit cleaner to make the difference about schema-level access or
table-level access, still I'd rather simplify the code and just only
keep the schema-level change as something we complain about.  Another
thing is that ACCESSEDTEMPREL is used in PreCommit_on_commit_actions()
to avoid the truncates of ON COMMIT DELETE ROWS if no temporary tables
have been accessed, still it would just mean that truncation would be
tried on empty tables for nothing even if say a function is created in
pg_temp.

Thoughts?
--
Michael

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: speeding up planning with partitions
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Re: Libpq support to connect to standby server as priority