Re: Add support for INDEX_CLEANUP and TRUNCATE to vacuumdb
От | Masahiko Sawada |
---|---|
Тема | Re: Add support for INDEX_CLEANUP and TRUNCATE to vacuumdb |
Дата | |
Msg-id | CA+fd4k5oGJbtq+JZFxr0ncpDsFx5FJonPH5ig0d7JWS30Qxg_A@mail.gmail.com обсуждение исходный текст |
Ответ на | Add support for INDEX_CLEANUP and TRUNCATE to vacuumdb ("Bossart, Nathan" <bossartn@amazon.com>) |
Ответы |
Re: Add support for INDEX_CLEANUP and TRUNCATE to vacuumdb
|
Список | pgsql-hackers |
On Thu, 11 Jun 2020 at 09:41, Bossart, Nathan <bossartn@amazon.com> wrote: > > Hi hackers, > > I quickly put together a patch to add INDEX_CLEANUP and TRUNCATE to > vacuumdb before noticing a previous thread for it [0]. My take on it > was to just name the options --skip-index-cleanup and --skip-truncate. > While that does not give you a direct mapping to the corresponding > VACUUM options, it simplifies the patch by avoiding the boolean > parameter parsing stuff altogether. > Thank you for updating the patch! I looked at this patch. @@ -412,6 +434,13 @@ vacuum_one_database(const char *dbname, vacuumingOptions *vacopts, exit(1); } + if (vacopts->skip_index_cleanup && PQserverVersion(conn) < 120000) + { + PQfinish(conn); + pg_log_error("cannot use the \"%s\" option on server versions older than PostgreSQL %s", + "skip-index-cleanup", "12"); + } + if (vacopts->skip_locked && PQserverVersion(conn) < 120000) { PQfinish(conn); exit(1) is missing after pg_log_error(). Regards, -- Masahiko Sawada http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: