pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Kohei KaiGai <kaigai@heterodb.com>
Cc: Kazutaka Onishi <onishi@heterodb.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: Ibrar Ahmed <ibrar.ahmad@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Subject: Re: TRUNCATE on foreign table
Date: Fri, 2 Apr 2021 11:43:58 +0900
Message-ID: <1ded9ac5-c5a0-15ed-71da-ba3e0c21dacf@oss.nttdata.com> (raw)
In-Reply-To: <CAOP8fzabGb04SuucMJEXKOLm1zwpMjDv0VQ=LLEoQzppO-h3sw@mail.gmail.com>
References: <CAJuF6cMWDDqU-vn_knZgma+2GMaout68YUgn1uyDnexRhqqM5Q@mail.gmail.com>
	<CAExHW5uk+J61fVgcf+HYNZTuY9UnFnLhr34wMYU26mCtpf8i5w@mail.gmail.com>
	<CAJuF6cPwm13tnfRUAcy2CpncEvrGUOaJPuz4rWVFixL28zTA1g@mail.gmail.com>
	<CAExHW5tceUdJSYMy6R8uYzJ2upKfKdJdWPyUmM16-_xEdFGL0g@mail.gmail.com>
	<CALtqXTdRzbnDqYv-bA3N83+C6+=NkWa=R69sSk=-PZgHdBY0Bg@mail.gmail.com>
	<CA+HiwqFVecXnLUtTv6J2hTyEdkVtkTae3QNfOKRobu+L_1=9QA@mail.gmail.com>
	<CAJuF6cN4oU==vATJ7AgSqxCzV6X7j95O97LtKJcwddVcAcEx1w@mail.gmail.com>
	<CAJuF6cMxN=3myt3Uf3hhpwrXy4kFsDbdq9O_9NOJgNU5AB-AUw@mail.gmail.com>
	<66da56a4-ed5a-a18f-0f5e-b4d21cda71af@oss.nttdata.com>
	<CAJuF6cNU3xS35Q8rUVAZoDJtVeKUZ6SaEW_8KxTdfZd0BMWaQg@mail.gmail.com>
	<ac31f2db-e607-a2bb-2e8a-dd01a2e4f881@oss.nttdata.com>
	<CAOP8fzbuJ5GdKa+=GtizbqFtO2xsQbn4mVjjzunmsNVJMChSMQ@mail.gmail.com>
	<420c3d7d-1961-4cf0-01f9-6c693a3189a8@oss.nttdata.com>
	<CAOP8fzabGb04SuucMJEXKOLm1zwpMjDv0VQ=LLEoQzppO-h3sw@mail.gmail.com>



On 2021/04/02 9:37, Kohei KaiGai wrote:
> It is fair enough for me to reverse the order of actual truncation.
> 
> How about the updated comments below?
> 
>      This is a multi-relation truncate.  We first open and grab exclusive
>      lock on all relations involved, checking permissions (local database
>      ACLs even if relations are foreign-tables) and otherwise verifying
>      that the relation is OK for truncation. In CASCADE mode, ...(snip)...
>      Finally all the relations are truncated and reindexed. If any foreign-
>      tables are involved, its callback shall be invoked prior to the truncation
>      of regular tables.

LGTM.


>> BTW, the latest patch doesn't seem to be applied cleanly to the master
>> because of commit 27e1f14563. Could you rebase it?
>>
> Onishi-san, go ahead. :-)

+1

Regards,

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





view thread (117+ messages)  latest in thread

Message-ID: <1ded9ac5-c5a0-15ed-71da-ba3e0c21dacf@oss.nttdata.com>
Permalink:  ../1ded9ac5-c5a0-15ed-71da-ba3e0c21dacf@oss.nttdata.com/
Also on:    postgresql.org/message-id/1ded9ac5-c5a0-15ed-71da-ba3e0c21dacf@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: masao.fujii@oss.nttdata.com, kaigai@heterodb.com, onishi@heterodb.com, amitlangote09@gmail.com, ibrar.ahmad@gmail.com, bharath.rupireddyforpostgres@gmail.com, zyu@yugabyte.com, ashutosh.bapat.oss@gmail.com
  Subject: Re: TRUNCATE on foreign table
  In-Reply-To: <1ded9ac5-c5a0-15ed-71da-ba3e0c21dacf@oss.nttdata.com>
  References: <CAJuF6cMWDDqU-vn_knZgma+2GMaout68YUgn1uyDnexRhqqM5Q@mail.gmail.com> <CAExHW5uk+J61fVgcf+HYNZTuY9UnFnLhr34wMYU26mCtpf8i5w@mail.gmail.com> <CAJuF6cPwm13tnfRUAcy2CpncEvrGUOaJPuz4rWVFixL28zTA1g@mail.gmail.com> <CAExHW5tceUdJSYMy6R8uYzJ2upKfKdJdWPyUmM16-_xEdFGL0g@mail.gmail.com> <CALtqXTdRzbnDqYv-bA3N83+C6+=NkWa=R69sSk=-PZgHdBY0Bg@mail.gmail.com> <CA+HiwqFVecXnLUtTv6J2hTyEdkVtkTae3QNfOKRobu+L_1=9QA@mail.gmail.com> <CAJuF6cN4oU==vATJ7AgSqxCzV6X7j95O97LtKJcwddVcAcEx1w@mail.gmail.com> <CAJuF6cMxN=3myt3Uf3hhpwrXy4kFsDbdq9O_9NOJgNU5AB-AUw@mail.gmail.com> <66da56a4-ed5a-a18f-0f5e-b4d21cda71af@oss.nttdata.com> <CAJuF6cNU3xS35Q8rUVAZoDJtVeKUZ6SaEW_8KxTdfZd0BMWaQg@mail.gmail.com> <ac31f2db-e607-a2bb-2e8a-dd01a2e4f881@oss.nttdata.com> <CAOP8fzbuJ5GdKa+=GtizbqFtO2xsQbn4mVjjzunmsNVJMChSMQ@mail.gmail.com> <420c3d7d-1961-4cf0-01f9-6c693a3189a8@oss.nttdata.com> <CAOP8fzabGb04SuucMJEXKOLm1zwpMjDv0VQ=LLEoQzppO-h3sw@mail.gmail.com> <1ded9ac5-c5a0-15ed-71da-ba3e0c21dacf@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox