Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server

Поиск
Список
Период
Сортировка
Искать
От
Ashutosh Bapat
Тема
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server
Дата
в 18:34:25
Msg-id
CAFjFpRcgXFGE9HBVM8PDrWsw3Y_sxMkcT2H1POJrMapq_+b1iA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Robert Haas <robertmhaas@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Robert Haas <robertmhaas@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Robert Haas <robertmhaas@gmail.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Kyotaro HORIGUCHI <kyota.horiguchi@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Kyotaro HORIGUCHI <kyota.horiguchi@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitioned table on foreign server Tom Lane <tgl@sss.pgh.pa.us>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Michael Paquier <michael@paquier.xyz>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Michael Paquier <michael@paquier.xyz>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Michael Paquier <michael@paquier.xyz>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <etsuro.fujita@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <etsuro.fujita@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Michael Paquier <michael@paquier.xyz>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <etsuro.fujita@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <etsuro.fujita@gmail.com>
Re: Problem while updating a foreign table pointing to a partitioned table on foreign server Daniil Davydov <3danissimo@gmail.com>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to a partitionedtable on foreign server Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Re: Problem while updating a foreign table pointing to apartitioned table on foreign server Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
On Thu, May 31, 2018 at 7:36 PM, Tom Lane  wrote:
> Kyotaro HORIGUCHI  writes:
>> If my understanding about non-system junk columns in a base relation
>> and identifiers of a foreign tuples are correct, what is needed here
>> is giving base relations the ability to have such junk column.
>
> The core of the problem, I think, is the question of exactly what
> postgresAddForeignUpdateTargets should put into the resjunk expressions
> it adds to an update/delete query's targetlist.  Per discussion yesterday,
> up to now it's always emitted Vars referencing the foreign relation,
> which is problematic because with that approach the desired info has
> to be exposed as either a regular or system column of that relation.
> But there's nothing saying that the expression has to be a Var.
>
> My thought about what we might do instead is that
> postgresAddForeignUpdateTargets could reserve a PARAM_EXEC slot
> and emit a Param node referencing that.  Then at runtime, while
> reading a potential target row from the remote, we fill that
> param slot along with the regular scan tuple slot.
>
> What you want for the first part of that is basically like
> generate_new_param() in subselect.c.  We don't expose that publicly
> at the moment, but we could, or maybe better to invent another wrapper
> around it like SS_make_initplan_output_param.

This looks like a lot of change which might take some time and may not
be back-portable. In the mean time, can we see if 0001 and 0002
patches are good and apply them. Those patches intend to stop the
multiple rows on the foreign server being updated by throwing error
(and aborting the transaction on the foreign server) when that
happens. That will at least avoid silent corruption that happens today
and should be back-portable.

[1] https://www.postgresql.org/message-id/CAFjFpRfK69ptCTNChBBk+LYMXFzJ92SW6NmG4HLn_1y7xFk=kw@mail.gmail.com

-- 
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: REIX, Tony
Дата:
FAQ