Re: TRUNCATE on foreign tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: TRUNCATE on foreign tables
Дата
Msg-id 20200102031654.GA11441@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: TRUNCATE on foreign tables  (Kohei KaiGai <kaigai@heterodb.com>)
Ответы Re: TRUNCATE on foreign tables
Список pgsql-hackers
On 2020-Jan-01, Kohei KaiGai wrote:

> Hello,
> 
> The attached patch adds TRUNCATE support on foreign table.
> 
> This patch adds an optional callback ExecForeignTruncate(Relation rel)
> to FdwRoutine.
> It is invoked during ExecuteTruncateGuts, then FDW driver hands over
> the jobs related to complete "truncate on the foreign table".

I think this would need to preserve the notion of multi-table truncates.
Otherwise it won't be possible to truncate tables linked by FKs.  I
think this means the new entrypoint needs to receive a list of rels to
truncate, not just one.  (Maybe an alternative is to make it "please
truncate rel X, and be aware that relations Y,Z are also being
truncated at the same time".)

Looking at apache arrow documentation, it doesn't appear that it has
anything like FK constraints.

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



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum