Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby?
От
Michael Paquier
Тема
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby?
Дата
Msg-id
CAB7nPqT5P2yrfd9_M6_JKJpVWL0saUduK-RUXBVFNv4ZjPLw+g@mail.gmail.com
Ответ на
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? (Craig Ringer)
Список
Дерево обсуждения
[HACKERS] Is anything preventing us from allowing write to foreign tables from standby? Alexander Korotkov <a.korotkov@postgrespro.ru>
[HACKERS] Re: Is anything preventing us from allowing write to foreign tablesfrom standby? Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Craig Ringer <craig@2ndquadrant.com>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Wolfgang Wilhelm <wolfgang20121964@yahoo.de>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Re: Is anything preventing us from allowing write toforeign tables from standby? Alexander Korotkov <a.korotkov@postgrespro.ru>
On Wed, Oct 18, 2017 at 9:14 AM, Craig Ringer wrote: > Superficially at least, it sounds like a good idea. Indeed. > We should only need a virtual xid when we're working with foreign > tables since we don't do any local heap changes. > > How's it work with savepoints? That's one thing to worry about. At least to me, it feels like cheating to allow an INSERT query to happen for a transaction which is read-only actually read-only because XactReadOnly is set to true when the transaction starts. I am wondering if we should extend BEGIN TRANSACTION with a sort of "WRITE ONLY FOREIGN" mode, which allows read queries as well as write queries for foreign tables, because we know that those will not generate WAL locally. This way it would be possible to block as well INSERT queries happening in a transaction which should be intrinsically read-only. + if (rte->relkind == 'f') + continue; Better to use RELKIND_FOREIGN_TABLE here. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления
От: Amit Langote
Дата: