Re: Running the fdw test from the terminal crashes into the core-dump
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Alena Rybakina <a.rybakina@postgrespro.ru>,
Pgsql Hackers <pgsql-hackers@postgresql.org>,
Amit Langote <amitlangote09@gmail.com>
Date: 2024-02-20T19:48:01Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > The real problem is that a MERGE ... DO NOTHING action reports that no > permissions need to be checked on the target relation, which is not a > problem when there are other actions in the MERGE command since they add > privs to check. When DO NOTHING is the only action, the added assert in > a61b1f748 is triggered. > So, this means we can fix this by simply requiring ACL_SELECT privileges > on a DO NOTHING action. We don't need to request specific privileges on > any particular column (perminfo->selectedCols continues to be the empty > set) -- which means that any role that has privileges on *any* column > would get a pass. If you're doing MERGE with any other action besides > DO NOTHING, you already have privileges on at least some column, so > adding ACL_SELECT breaks nothing. LGTM. regards, tom lane
Commits
-
Revise MERGE documentation
- c4bd6ff57c9a 16.3 landed
- 6979ea2638a5 17.0 landed
- 172d7f7e666e 15.7 landed
-
MERGE ... DO NOTHING: require SELECT privileges
- a3f5d2056ceb 16.3 landed
- 90ad85db6a4e 15.7 landed
- 4989ce72644b 17.0 landed
-
Rework query relation permission checking
- a61b1f74823c 16.0 cited