From: | "Andrey V(dot) Lepikhov" <a(dot)lepikhov(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Subject: | Re: Ideas about a better API for postgres_fdw remote estimates |
Date: | 2020-08-31 10:06:09 |
Message-ID: | 0a75a7b9-d800-4c70-7eec-7fa7630a854b@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 8/29/20 9:50 PM, Tom Lane wrote:
> Years ago (when I was still at Salesforce, IIRC, so ~5 years) we had
> some discussions about making it possible for pg_dump and/or pg_upgrade
> to propagate stats data forward to the new database. There is at least
> one POC patch in the archives for doing that by dumping the stats data
> wrapped in a function call, where the target database's version of the
> function would be responsible for adapting the data if necessary, or
> maybe just discarding it if it couldn't adapt. We seem to have lost
> interest but it still seems like something worth pursuing. I'd guess
> that if such infrastructure existed it could be helpful for this.
Thanks for this helpful feedback.
I found several threads related to the problem [1-3].
I agreed that this task needs to implement an API for
serialization/deserialization of statistics:
pg_load_relation_statistics(json_string text);
pg_get_relation_statistics(relname text);
We can use a version number for resolving conflicts with different
statistics implementations.
"Load" function will validate the values[] anyarray while deserializing
the input json string to the datatype of the relation column.
Maybe I didn't feel all the problems of this task?
1. https://www.postgresql.org/message-id/flat/724322880.K8vzik8zPz%40abook
2.
https://www.postgresql.org/message-id/flat/CAAZKuFaWdLkK8eozSAooZBets9y_mfo2HS6urPAKXEPbd-JLCA%40mail.gmail.com
3.
https://www.postgresql.org/message-id/flat/GNELIHDDFBOCMGBFGEFOOEOPCBAA.chriskl%40familyhealth.com.au
--
regards,
Andrey Lepikhov
Postgres Professional
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2020-08-31 10:10:39 | Re: Append with naive multiplexing of FDWs |
Previous Message | Etsuro Fujita | 2020-08-31 09:20:15 | Re: Append with naive multiplexing of FDWs |