From: | "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com> |
---|---|
To: | 'Bharath Rupireddy' <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Support for VACUUMing Foreign Tables |
Date: | 2021-05-14 01:05:02 |
Message-ID: | TYAPR01MB2990552A312E1C4F651F0B89FE509@TYAPR01MB2990.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
> I think it will be useful to allow foreign tables to be VACUUMed if
> the underlying FDW supports, currently VACUUM doesn't support foreign
> tables, see [1].
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.)
> this may not be much useful for FDWs that connect to remote non-MVCC
> databases where the concept of VACUUM may not apply, but for
> postgres_fdw and others it might help.
Can you show some examples of "others"? I believe we should be careful not to make the FDW interface a swamp for functions that are only convenient for PostgreSQL.
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.
Regards
Takayuki Tsunakawa
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2021-05-14 01:16:37 | Re: What is lurking in the shadows? |
Previous Message | Peter Geoghegan | 2021-05-14 01:03:47 | Re: Testing autovacuum wraparound (including failsafe) |