Re: Ideas about a better API for postgres_fdw remote estimates - Mailing list pgsql-hackers

From Andrey V. Lepikhov
Subject Re: Ideas about a better API for postgres_fdw remote estimates
Date
Msg-id ac237104-efe6-e0c7-5e48-ce508f602f69@postgrespro.ru
Whole thread Raw
In response to Re: Ideas about a better API for postgres_fdw remote estimates  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Ideas about a better API for postgres_fdw remote estimates
Re: Ideas about a better API for postgres_fdw remote estimates
List pgsql-hackers
On 8/31/20 6:19 PM, Ashutosh Bapat wrote:
> On Mon, Aug 31, 2020 at 3:36 PM Andrey V. Lepikhov
> <a.lepikhov@postgrespro.ru> wrote:
>>
>> Thanks for this helpful feedback.
> I think the patch has some other problems like it works only for
> regular tables on foreign server but a foreign table can be pointing
> to any relation like a materialized view, partitioned table or a
> foreign table on the foreign server all of which have statistics
> associated with them. I didn't look closely but it does not consider
> that the foreign table may not have all the columns from the relation
> on the foreign server or may have different names. But I think those
> problems are kind of secondary. We have to agree on the design first.
> 
In accordance with discussion i made some changes in the patch:
1. The extract statistic routine moved into the core.
2. Serialized stat contains 'version' field to indicate format of 
statistic received.
3. ANALYZE and VACUUM ANALYZE uses this approach only in the case of 
implicit analysis of the relation.

I am currently keeping limitation of using the approach for regular 
relations only, because i haven't studied the specifics of another types 
of relations.
But I don't know any reason to keep this limit in the future.

The patch in attachment is very raw. I publish for further substantive 
discussion.

-- 
regards,
Andrey Lepikhov
Postgres Professional

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: A micro-optimisation for walkdir()
Next
From: Michael Paquier
Date:
Subject: Re: Switch to multi-inserts for pg_depend