vacuumdb: Skip temporary tables in query to build list of relations Running vacuumdb with a non-superuser while another user has created a temporary table would lead to a mid-flight permission failure, interrupting the operation. vacuum_rel() skips temporary relations of other backends, and it makes no sense for vacuumdb to know about these relations, so let's switch it to ignore temporary relations entirely.
Adding a qual in the query based on relpersistence simplifies the generation of its WHERE clause in vacuum_one_database(), per se the removal of "has_where". Author: VaibhaveS, Michael Paquier Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/CAM_eQjwfAR=y3g1fgys1u9ftmc+fyjm9amnfy2qczbnddbn...@mail.gmail.com Backpatch-through: 12 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1ab67c9dfaadda86059f405e5746efb6ddb9fe21 Modified Files -------------- src/bin/scripts/vacuumdb.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-)