From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Kazutaka Onishi <onishi(at)heterodb(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | Kohei KaiGai <kaigai(at)heterodb(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
Subject: | Re: TRUNCATE on foreign table |
Date: | 2021-04-07 19:19:37 |
Message-ID: | e1d29b4c-0a3d-9e42-9575-a9373b593aa3@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2021/04/06 21:06, Kazutaka Onishi wrote:
> Thank you for checking v13, and here is v14 patch.
>
>> 1) Are we using all of these macros? I see that we are setting them
>> but we only use TRUNCATE_REL_CONTEXT_ONLY. If not used, can we remove
>> them?
>
> These may be needed for the foreign data handler other than postgres_fdw.
Could you tell me how such FDWs use TRUNCATE_REL_CONTEXT_CASCADING and _NORMAL? I'm still not sure if TRUNCATE_REL_CONTEXT_CASCADING is really required.
With the patch, both inherited and referencing relations are marked as TRUNCATE_REL_CONTEXT_CASCADING? Is this ok for that use? Or we should distinguish them?
+#define TRUNCATE_REL_CONTEXT_NORMAL 0x01
+#define TRUNCATE_REL_CONTEXT_ONLY 0x02
+#define TRUNCATE_REL_CONTEXT_CASCADING 0x04
With the patch, these are defined as flag bits. But ExecuteTruncate() seems to always set the entry in relids_extra to either of them, not the combination of them. So we can define them as enum?
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Dilger | 2021-04-07 19:20:50 | Re: multi-install PostgresNode fails with older postgres versions |
Previous Message | Alvaro Herrera | 2021-04-07 19:13:14 | Re: multi-install PostgresNode fails with older postgres versions |