Add permission check for MERGE/SPLIT partition operations
Alexander Korotkov <akorotkov@postgresql.org>
Add permission check for MERGE/SPLIT partition operations Currently, we check only owner permission for the parent table before MERGE/SPLIT partition operations. This leads to a security hole when users can get access to the data of partitions without permission. This commit fixes this problem by requiring owner permission on all the partitions involved. Reported-by: Alexander Lakhin Discussion: https://postgr.es/m/0520c72e-8d97-245e-53f9-173beca2ab2e%40gmail.com Author: Dmitry Koval, Alexander Korotkov
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/parser/parse_utilcmd.c | modified | +5 −0 |
| src/test/regress/expected/partition_merge.out | modified | +29 −0 |
| src/test/regress/expected/partition_split.out | modified | +29 −0 |
| src/test/regress/sql/partition_merge.sql | modified | +33 −0 |
| src/test/regress/sql/partition_split.sql | modified | +33 −0 |
Discussion
- Add SPLIT PARTITION/MERGE PARTITIONS commands 298 messages · 2022-05-31 → 2026-06-30