Summary:
ff4ea8fcfe060c8924aace3b9b482d33d44f5816 turned on
ysql_yb_ddl_transaction_block_enabled for TestPgRegressPgAuth and
disabled yb.port.rowsecurity in the same change, because the test
interleaves SAVEPOINT with DDL inside a transaction block and that
combination was unsupported. Support has since landed, so make changes
to enable yb.port.rowsecurity and get it to pass:
- Set preview flag ysql_yb_enable_ddl_savepoint_support on. Note that
the flag covers the whole yb_pg_auth_schedule, not just
yb.port.rowsecurity, but none of the other tests change due to this.
- Drop four cleanup statements marked as workarounds for the lack of
transactional DDL. Each dropped a table or view that a preceding
ROLLBACK had left behind. With transactional DDL the rollback really
does remove the object, so the DROP now fails with "does not exist".
Those four sections are now identical to upstream.
- The expected output was last regenerated by
f627506e2a1ef5ac03bb58fcea0e6a5e94e80b70 in April 2025, four months
before the test was disabled, so it had also gone stale against two
later plan changes. Neither is a regression, and both were missed
precisely because the test was disabled when they landed. Update
those outputs:
- The RLS qual dauthor = CURRENT_USER moves from Filter to Storage
Filter. a28f3dde99a08ee147b64600134a70df7d0976b3 (#28997,
2025-10-17) marks T_SQLValueFunction pushable in yb_pushdown_walker
and evaluates it to a Const in yb_expr_instantiate_exprs_mutator,
and CURRENT_USER is one of the functions it lists. RLS policy quals
in this file were already pushed down before that commit, for
instance "Storage Filter: (dlevel <= $0)", so the CURRENT_USER
comparison is the only newly pushable piece. The non-leakproof
f_leak(dtitle) correctly stays local, which keeps the policy qual
ahead of it. That commit rewrote Filter to Storage Filter in
yb.orig.dml_pushdown.out and yb.port.partition_prune.out but not
here.
- A scan pruned down to one partition prints alias part_document_1
instead of part_document. cdae8135a2e53195e52232705dc9526a325a90e1
(#28070, 2026-03-14) gives every partition a globally unique hint
alias, so an Append no longer shares its alias with its left-most
child. That commit applied the same rename across 20 expected
files, for example "Seq Scan on lp_ad lp" to "Seq Scan on lp_ad
lp_1" in yb.port.partition_prune.out, but not here.
Merge:
- src/postgres/src/test/regress/expected/yb.port.rowsecurity.out
- Skip the part_document_1 alias rename, due to lack of commit
cdae8135a2e53195e52232705dc9526a325a90e1.
Test Plan:
On Almalinux 8:
./yb_build.sh fastdebug --gcc13 daemons initdb --no-ybc \
--skip-extra-pg-extensions --no-odyssey \
--java-test TestPgRegressPgAuth
Close: #33485
Original commit: 2e95d947afeb62582c017550cdcc61be8fd7cf3e / D57334
Reviewers: bkolagani
Reviewed By: bkolagani
Differential Revision: https://phorge.dev.yugabyte.com/D57424