> On Mar 14, 2021, at 12:10 AM, Julien Rouhaud <rjuju...@gmail.com> wrote:
> 
> v6 attached, rebase only due to conflict with recent commit.

Hi Julien,

I'm coming to this patch quite late, perhaps too late to change design decision 
in time for version 14.


+       if (outdated && PQserverVersion(conn) < 140000)
+       {
+               PQfinish(conn);
+               pg_log_error("cannot use the \"%s\" option on server versions 
older than PostgreSQL %s",
+                                        "outdated", "14");
+               exit(1);
+       }

If detection of outdated indexes were performed entirely in the frontend 
(reindexdb) rather than in the backend (reindex command), would reindexdb be 
able to connect to older servers?  Looking quickly that the catalogs, it 
appears pg_index, pg_depend, pg_collation and a call to the SQL function 
pg_collation_actual_version() compared against pg_depend.refobjversion would be 
enough to construct a list of indexes in need of reindexing.  Am I missing 
something here?

I understand that wouldn't help somebody wanting to reindex from psql.  Is that 
the whole reason you went a different direction with this feature?



+       printf(_("      --outdated               only process indexes having 
outdated depencies\n"));  

typo.



+       bool outdated;  /* depends on at least on deprected collation? */

typo.



—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Reply via email to