Re: ExecRTCheckPerms() and many prunable partitions
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Justin Pryzby <pryzbyj@telsasoft.com>, Tom Lane <tgl@sss.pgh.pa.us>, David Rowley <dgrowleyml@gmail.com>, Greg Stark <stark@mit.edu>,
Zhihong Yu <zyu@yugabyte.com>, Julien Rouhaud <rjuju123@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-10-03T09:10:13Z
Lists: pgsql-hackers
Attachments
- v18-0001-Rework-query-relation-permission-checking.patch (application/octet-stream) patch v18-0001
- v18-0002-Do-not-add-hidden-OLD-NEW-RTEs-to-stored-view-ru.patch (application/octet-stream) patch v18-0002
Hi, On Mon, Oct 3, 2022 at 2:10 AM Andres Freund <andres@anarazel.de> wrote: > On 2022-09-07 18:23:06 +0900, Amit Langote wrote: > > Attached updated patches. > > Thanks to Justin's recent patch (89d16b63527) to add > -DRELCACHE_FORCE_RELEASE -DCOPY_PARSE_PLAN_TREES -DWRITE_READ_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST > to the FreeBSD ci task we now see the following: > > https://cirrus-ci.com/task/4772259058417664 > https://api.cirrus-ci.com/v1/artifact/task/4772259058417664/testrun/build/testrun/main/regress/regression.diffs > > diff -U3 /tmp/cirrus-ci-build/src/test/regress/expected/updatable_views.out /tmp/cirrus-ci-build/build/testrun/main/regress/results/updatable_views.out > --- /tmp/cirrus-ci-build/src/test/regress/expected/updatable_views.out 2022-10-02 10:37:08.888945000 +0000 > +++ /tmp/cirrus-ci-build/build/testrun/main/regress/results/updatable_views.out 2022-10-02 10:40:26.947887000 +0000 > @@ -1727,14 +1727,16 @@ > (4 rows) > > UPDATE base_tbl SET id = 2000 WHERE id = 2; > +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree > UPDATE rw_view1 SET id = 3000 WHERE id = 3; > +WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree > SELECT * FROM base_tbl; > id | idplus1 > ------+--------- > 1 | 2 > 4 | 5 > - 2000 | 2001 > - 3000 | 3001 > + 2000 | 3 > + 3000 | 4 > (4 rows) > > DROP TABLE base_tbl CASCADE; > > and many more. Thanks for the heads up. Grateful for those new -D flags. Turns out I had forgotten to update out/readRangeTblEntry() after bringing extraUpdatedCols back into RangeTblEntry per Tom's comment. Fixed in the attached. -- Thanks, Amit Langote EDB: http://www.enterprisedb.com
Commits
-
Add a test case for a316a3bc
- 054ff3b33a85 17.0 landed
- 0a14bca662a4 16.0 landed
-
Correctly set userid of subquery relations' child rels
- a316a3bc6d3f 16.0 landed
-
Fix buggy recursion in flatten_rtes_walker().
- c7468c73f7b6 16.0 landed
-
Remove some dead code in selfuncs.c
- 438e6b724090 16.0 landed
-
Update outdated comment in ApplyRetrieveRule
- 29861e228a47 16.0 landed
-
Rework query relation permission checking
- a61b1f74823c 16.0 landed
-
Generalize ri_RootToPartitionMap to use for non-partition children
- fb958b5da86d 16.0 landed
-
Stop accessing checkAsUser via RTE in some cases
- 599b33b9492d 16.0 landed
-
Add 'missing_ok' argument to build_attrmap_by_name
- ad86d159b6ab 16.0 landed