cleanup & refactoring on reindexdb.c

Julien Rouhaud <rjuju123@gmail.com>

From: Julien Rouhaud <rjuju123@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-05-12T09:16:28Z
Lists: pgsql-hackers

Attachments

Hi,

As discussed in
https://www.postgresql.org/message-id/CAOBaU_Yo61RwNO3cW6WVYWwH7EYMPuexhKqufb2nFGOdunbcHw@mail.gmail.com,
current coding in reindexdb.c is error prone, and
reindex_system_catalogs() is also not really required.

I attach two patches to fix both (it could be squashed in a single
commit as both are straightforward), for upcoming v13.

Commits

  1. Refactor code of reindexdb for query generation