Re: TRUNCATE on foreign table

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: Kazutaka Onishi <onishi(at)heterodb(dot)com>, Kohei KaiGai <kaigai(at)heterodb(dot)com>
Cc: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, Zhihong Yu <zyu(at)yugabyte(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-03-08 17:24:03
Message-ID: CALtqXTdRzbnDqYv-bA3N83+C6+=NkWa=R69sSk=-PZgHdBY0Bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 11, 2021 at 6:23 PM Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
wrote:

> On Wed, Feb 10, 2021 at 10:58 PM Kazutaka Onishi <onishi(at)heterodb(dot)com>
> wrote:
> >
> > That's because using the foreign server is difficult for the user.
> >
> > For example, the user doesn't always have the permission to login to the
> forein server.
> > In some cases, the foreign table has been created by the administrator
> that has permission to access the two servers and the user only uses the
> local server.
> > Then the user has to ask the administrator to run TRUNCATE every time.
>
> That might actually be seen as a loophole but ...
>
> >
> > Furthermore,there are some fdw extensions which don't support SQL.
> mongo_fdw, redis_fdw, etc...
> > These extensions have been used to provide SQL interfaces to the users.
> > It's hard for the user to run TRUNCATE after learning each database.
>
> this has some appeal.
>
> Thanks for sharing the usecases.
> --
> Best Wishes,
> Ashutosh Bapat
>
>
> The patch (pgsql14-truncate-on-foreign-table.v2.patch) does not apply
successfully.

http://cfbot.cputube.org/patch_32_2972.log

patching file contrib/postgres_fdw/expected/postgres_fdw.out
Hunk #2 FAILED at 9179.
1 out of 2 hunks FAILED -- saving rejects to file
contrib/postgres_fdw/expected/postgres_fdw.out.rej

As this is a minor change therefore I have updated the patch. Please take a
look.

--
Ibrar Ahmed

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-03-08 17:29:16 Re: [HACKERS] Custom compression methods
Previous Message Joel Jacobson 2021-03-08 17:20:02 Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]