|From:||Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>|
|To:||Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>|
|Cc:||Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>|
|Subject:||Re: progress report for ANALYZE|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On 2019-Jul-03, Tatsuro Yamada wrote:
> My ex-colleague Vinayak created same patch in 2017 , and he
> couldn't get commit because there are some reasons such as the
> patch couldn't handle analyzing Foreign table. Therefore, I wonder
> whether your patch is able to do that or not.
>  ANALYZE command progress checker
So just now I went to check the jold thread (which I should have
searched for before writing my own implementation!). It seems clear
that many things are pretty similar in both patch, but I think for the
most part they are similar just because the underlying infrastructure
imposes a certain design already, rather than there being any actual
copying. (To be perfectly clear: I didn't even know that this patch
existed and I didn't grab any code from there to produce my v1.)
However, you've now modified the patch from what I submitted and I'm
wondering if you've taken any inspiration from Vinayak's old patch. If
so, it seems fair to credit him as co-author in the commit message. It
would be good to get his input on the current patch, though.
I have not looked at the current version of the patch yet, but I intend
to do so during the upcoming commitfest.
Thanks for moving this forward!
On the subject of FDW support: I did look into supporting that before
submitting this. I think it's not academically difficult: just have the
FDW's acquire_sample_rows callback invoke the update_param functions
once in a while. Sadly, in practical terms it looks like postgres_fdw
is quite stupid about ANALYZE (it scans the whole table??) so doing
something that's actually useful may not be so easy. At least, we know
the total relation size and maybe we can add the ctid column to the
cursor in postgresAcquireSampleRowsFunc so that we have a current block
number to report (becing careful about synchronized seqscans). I think
this should *not* be part of the main ANALYZE-progress commit, though,
because getting that properly sorted out is going to take some more
I do wonder why doesn't postgres_fdw use TABLESAMPLE.
I did not look at other FDWs at all, mind.
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
|Next Message||Craig Ringer||2019-08-13 14:02:51||Re: Configuring bgw_restart_time|
|Previous Message||Konstantin Knizhnik||2019-08-13 13:50:17||Re: Global temporary tables|