pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: vacuumdb: Skip temporary tables in query to build list of relati
7+ messages / 1 participants
[nested] [flat]

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/74eaa0544abf84d82bceb80e6f66321ec4c92c82

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9db4598c9c984d41896d517ff53b7b0cfbb3dc2e

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

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(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/60c618216ddbfcd65fc6c8078c1dbb775643662b

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1ea4d9c001e686133f6f7c553221abd109117a0c

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/85cb21df673f3a0545b21eadcced7cb038c9fe9c

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 40 +++++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 15 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: vacuumdb: Skip temporary tables in query to build list of relati
@ 2024-09-25 05:45  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2024-09-25 05:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ef57a713580feb5f84f23882e6980cc31e74cf85

Modified Files
--------------
src/bin/scripts/vacuumdb.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2024-09-25 05:45 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>
2024-09-25 05:45 pgsql: vacuumdb: Skip temporary tables in query to build list of relati Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox