Re: Is temporary functions feature official/supported? Found someissues with it.

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Is temporary functions feature official/supported? Found someissues with it.
Дата
Msg-id 201901041543.wdduitrlu2th@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Is temporary functions feature official/supported? Found someissues with it.  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Is temporary functions feature official/supported? Found some issues with it.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2019-Jan-04, Michael Paquier wrote:

> That should not be allowed to commit directly.  I think that we should
> just add a new value for MyXactFlags which tracks the transaction
> where the temporary namespace has been created, and generate an error
> if trying to use 2PC in this case.

That implies that a 2PC transaction will fail if it's run in a session
for which the temp namespace doesn't previously exist.  I think it's a
fairly ugly failure mode, and one that normal testing will not catch
because it'll occur very rarely.  An app that detects this problem at
run time will have to create a random temp object, commit normally, then
re-run the 2PC transaction from the start ... a lot of code to deal with
something that shouldn't happen in the first place.

I wonder if we can somehow create the temp schema in a way that makes it
immediately visible to everyone, and not depend on the commit status of
the creating transaction -- say mark the tuple with xmin=frozenXid or
something like ugly that.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Fabrice LEGROS
Дата:
Сообщение: SELECT do not return all rows depending on selected columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is temporary functions feature official/supported? Found some issues with it.