diff options
author | Michael Paquier <michael@paquier.xyz> | 2024-09-25 14:44:57 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2024-09-25 14:44:57 +0900 |
commit | 60c618216ddbfcd65fc6c8078c1dbb775643662b (patch) | |
tree | 68a51be27e65f9d84f87d6cf8ba5e48ac2e1b763 /src/backend/executor/nodeHashjoin.c | |
parent | f51b34b3eddbc501063f7b8ac470d26ce4e18a48 (diff) | |
download | postgresql-60c618216ddbfcd65fc6c8078c1dbb775643662b.tar.gz postgresql-60c618216ddbfcd65fc6c8078c1dbb775643662b.zip |
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/executor/nodeHashjoin.c')
0 files changed, 0 insertions, 0 deletions