Support for VACUUMing Foreign Tables

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Support for VACUUMing Foreign Tables
Date: 2021-05-13 04:14:39
Message-ID: CALj2ACWrfX72ZQ1ZJozZof0KWxSsZDtdW+jV9=QgkhQRi5=SNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-05-13 04:18:05 Re: compute_query_id and pg_stat_statements
Previous Message Bharath Rupireddy 2021-05-13 04:06:35 Re: alter subscription drop publication fixes