diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-09-25 14:44:59 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-09-25 14:44:59 +0900 |
commit | 9db4598c9c984d41896d517ff53b7b0cfbb3dc2e (patch) | |
tree | 615e423c7852aef66a17fd7be662f1a277addc23 /src/backend/commands/dbcommands.c | |
parent | 14c57cb63907eb7af0f973022b919c0f777db0d9 (diff) |
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+FyJm9amNfY2QCZBnDDbNPZg@mail.gmail.com
Backpatch-through: 12
Diffstat (limited to 'src/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions