Re: TRUNCATE on foreign table

From: Kazutaka Onishi <onishi(at)heterodb(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Kohei KaiGai <kaigai(at)heterodb(dot)com>, Zhihong Yu <zyu(at)yugabyte(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(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-06 16:44:53
Message-ID: CAJuF6cN9tJF57HpcdcXPFUhDS-y4MA4+XLTgrD4hxwBeb=Lpyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've attached v15.

> I still feel that the above bunch of code is duplicate of what
> do_sql_command function already has. I would recommend that we just
> make that function non-static(it's easy to do) and keep the
> declaration in postgres_fdw.h and use it in the
> postgresExecForeignTruncate.

I've tried this on v15.

> Another minor comment:
> We could move + ForeignServer *serv = NULL; within foreach (lc,
> frels_list), because it's not being used outside.

I've moved it.

> cfbot failure on v14 - https://cirrus-ci.com/task/4772360931770368.
> Looks like it is not related to this patch, please re-confirm it.

I've checked v15 patch with "make check-world" and confirmed this passed.

2021年4月6日(火) 23:25 Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>:
>
> On Tue, Apr 6, 2021 at 5:36 PM Kazutaka Onishi <onishi(at)heterodb(dot)com> wrote:
> >
> > Thank you for checking v13, and here is v14 patch.
>
> cfbot failure on v14 - https://cirrus-ci.com/task/4772360931770368.
> Looks like it is not related to this patch, please re-confirm it.
>
> With Regards,
> Bharath Rupireddy.
> EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
pgsql14-truncate-on-foreign-table.v15.patch application/octet-stream 40.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-04-06 17:09:53 Re: Remove page-read callback from XLogReaderState.
Previous Message Andres Freund 2021-04-06 16:32:16 Re: shared-memory based stats collector