Re: Support for VACUUMing Foreign Tables - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Support for VACUUMing Foreign Tables
Date
Msg-id YJ4MfqUJBfuu9dYZ@paquier.xyz
Whole thread Raw
In response to RE: Support for VACUUMing Foreign Tables  ("tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>)
List pgsql-hackers
On Fri, May 14, 2021 at 01:05:02AM +0000, tsunakawa.takay@fujitsu.com wrote:
> Could you let us imagine more concretely how useful it will be?
> While TRUNCATE can be part of an application's data processing as
> alternative to DELETE, I think VACUUM is purely the data storage
> maintenance that's performed by the DBA and can be done naturally
> locally on the server where the table resides.  (The existing
> ANALYZE on FDW is an exception; it's useful to also have data
> statistics locally.)

The concept of vacuuming applies to PG because of its concepts behind
MVCC.  Thinking broader, in which aspect can that apply to FDWs in
general?

> How about adding a routine to the FDW interface that allows to
> execute an arbitrary command like the following?  VACUUM will be
> able to use this.
>
>     PGresult *DoCommandPathThrough(ForeignTable *table, const char *command);
>
> Or, maybe it's more flexible to use ForeignServer instead of ForeignTable.

Being able to pass down to remote servers arbitrary command strings
sounds like a recipy for security holes, IMO.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: subscriptioncheck failure
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Some doubious error messages and comments