From: | Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Magnus Hagander <magnus(at)hagander(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: REINDEX backend filtering |
Date: | 2021-03-15 00:01:20 |
Message-ID: | 88B42AEA-2E6B-41C9-B0B6-6DCF85FF5BF9@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Mar 14, 2021, at 12:10 AM, Julien Rouhaud <rjuju123(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2021-03-15 00:09:16 | Re: A qsort template |
Previous Message | Michael Paquier | 2021-03-14 23:56:00 | Re: REINDEX backend filtering |