Re: pgsql: Sample postgres_fdw tables remotely during ANALYZE - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Sample postgres_fdw tables remotely during ANALYZE
Date
Msg-id 20230112111746.uoowzww6lt2ypldg@alvherre.pgsql
Whole thread Raw
In response to pgsql: Sample postgres_fdw tables remotely during ANALYZE  (Tomas Vondra <tomas.vondra@postgresql.org>)
List pgsql-committers
On 2022-Dec-30, Tomas Vondra wrote:

> Sample postgres_fdw tables remotely during ANALYZE
> 
> When collecting ANALYZE sample on foreign tables, postgres_fdw fetched
> all rows and performed the sampling locally. For large tables this means
> transferring and immediately discarding large amounts of data.
> 
> This commit allows the sampling to be performed on the remote server,
> transferring only the much smaller sample. The sampling is performed
> using the built-in TABLESAMPLE methods (system, bernoulli) or random()
> function, depending on the remote server version.
> 
> Remote sampling can be enabled by analyze_sampling on the foreign server
> and/or foreign table, with supported values 'off', 'auto', 'system',
> 'bernoulli' and 'random'. The default value is 'auto' which uses either
> 'bernoulli' (TABLESAMPLE method) or 'random' (for remote servers without
> TABLESAMPLE support).

You left out the Discussion line, so here's the link:
https://postgr.es/m/151e835f-55d6-ddbc-b5b4-07ee606aba44@enterprisedb.com

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Nunca se desea ardientemente lo que solo se desea por razón" (F. Alexandre)



pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Improve handling of inherited GENERATED expressions.
Next
From: Amit Langote
Date:
Subject: Re: pgsql: Improve handling of inherited GENERATED expressions.