From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Andrey Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>, 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-29 16:50:59 |
Message-ID: | 3565504.1598719859@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> Isn't this going to create a version dependency that we'll need to deal
> with..? What if a newer major version has some kind of improved ANALYZE
> command, in terms of what it looks at or stores, and it's talking to an
> older server?
Yeah, this proposal is a nonstarter unless it can deal with the remote
server being a different PG version with different stats.
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.
> When I was considering the issue with ANALYZE and FDWs, I had been
> thinking it'd make sense to just change the query that's built in
> deparseAnalyzeSql() to have a TABLESAMPLE clause, but otherwise run in
> more-or-less the same manner as today.
+1, that seems like something worth doing in any case, since even if
we do get somewhere with the present idea it would only work for new
remote servers. TABLESAMPLE would work pretty far back (9.5,
looks like).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Lepikhov | 2020-08-29 17:00:18 | Re: Ideas about a better API for postgres_fdw remote estimates |
Previous Message | Tom Lane | 2020-08-29 16:36:42 | Re: Clang UndefinedBehaviorSanitize (Postgres14) Detected undefined-behavior |