Hi,
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]. In case of postgres_fdw, if foreign tables are
specified in the local VACUUM command, a per-server remote VACUUM
command can be prepared with the foreign tables that belong to the
same server and sent to the foreign server. This design is similar to
TRUNCATE on foreign tables committed as part of 8ff1c946. Although,
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.
I would like to hear opinions from the hackers. If it's not
possible/feasible to do this, please let me know the reasons. Thanks.
[1] postgres=# vacuum ft1; ---> ft1 is a foreign table
WARNING: skipping "ft1" --- cannot vacuum non-tables or special system tables
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com