Re: TRUNCATE on foreign table

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: TRUNCATE on foreign table
Дата
Msg-id 14cd2c16-8f95-e163-7797-db939b663ce5@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: TRUNCATE on foreign table  (Kohei KaiGai <kaigai@heterodb.com>)
Ответы Re: TRUNCATE on foreign table  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers

On 2021/03/29 9:31, Kohei KaiGai wrote:
> Fujii-san,
> 
>> XLOG_HEAP_TRUNCATE record is written even for the truncation of
>> a foreign table. Why is this necessary?
>>
> Foreign-tables are often used to access local data structure, like
> columnar data files
> on filesystem, not only remote accesses like postgres_fdw.
> In case when we want to implement logical replication on this kind of
> foreign-tables,
> truncate-command must be delivered to subscriber node - to truncate
> its local data.
> 
> In case of remote-access FDW drivers, truncate-command on the subscriber-side is
> probably waste of cycles, however, only FDW driver and DBA who configured the
> foreign-table know whether it is necessary, or not.
> 
> How about your opinions?

I understand the motivation of this. But the other DMLs like UPDATE also
do the same thing for foreign tables? That is, when those DML commands
are executed on foreign tables, their changes are WAL-logged in a publisher side,
e.g., for logical replication? If not, it seems strange to allow only TRUNCATE
on foreign tables to be WAL-logged in a publisher side...

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



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

Предыдущее
От: "Euler Taveira"
Дата:
Сообщение: Re: row filtering for logical replication
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Bug on update timing of walrcv->flushedUpto variable