Re: TRUNCATE on foreign table

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>
Cc: Kohei KaiGai <kaigai@heterodb.com>, Kazutaka Onishi <onishi@heterodb.com>, Zhihong Yu <zyu@yugabyte.com>, Amit Langote <amitlangote09@gmail.com>, Ibrar Ahmed <ibrar.ahmad@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Date: 2021-04-13T03:38:35Z
Lists: pgsql-hackers

On 2021/04/13 10:21, Bharath Rupireddy wrote:
> I agree to convert to bits and pass it as int value which is
> extensible i.e. we can pass more extra parameters across if required.

Looks good to me.


> Also I'm not in favour of removing relids_extra altogether, we might
> need this to send some info in future.
> 
> Both 0001 and 0002(along with the new phrasings) look good to me.

Thanks for updating the patches!

One question is; "CONTEXT" of "TRUNCATE_REL_CONTEXT_ONLY" is required?
If not, I'm tempted to shorten the name to "TRUNCATE_REL_ONLY" or something.

+     <structname>Relation</structname> data structures for each
+     foreign tables to be truncated.

"foreign tables" should be "foreign table" because it follows "each"?

+    <para>
+     <literal>behavior</literal> is either
+     <literal>DROP_RESTRICT</literal> or <literal>DROP_CASCADE</literal>.
+     <literal>DROP_CASCADE</literal> indicates that the
+     <literal>CASCADE</literal> option was specified in the original
       <command>TRUNCATE</command> command.

Why did you remove the description for DROP_RESTRICT?

Regards,

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



Commits

  1. doc: Review for "Allow TRUNCATE command to truncate foreign tables".

  2. Don't pass "ONLY" options specified in TRUNCATE to foreign data wrapper.

  3. Support tab-complete for TRUNCATE on foreign tables.

  4. Allow TRUNCATE command to truncate foreign tables.

  5. Add support for asynchronous execution.