aboutsummaryrefslogtreecommitdiff
path: root/src/backend/libpq/be-gssapi-common.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-06-18 18:00:09 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-06-18 18:00:09 -0400
commitc58a41605ffabe8e4184b4c3b2d919638cd3357d (patch)
tree7c7f269b4f0b753f099ba9133c2a66390278b7a5 /src/backend/libpq/be-gssapi-common.c
parentb2c740c426daca2e43a2c86ff19661baf05ad00a (diff)
downloadpostgresql-c58a41605ffabe8e4184b4c3b2d919638cd3357d.tar.gz
postgresql-c58a41605ffabe8e4184b4c3b2d919638cd3357d.zip
Fix misbehavior of DROP OWNED BY with duplicate polroles entries.
Ordinarily, a pg_policy.polroles array wouldn't list the same role more than once; but CREATE POLICY does not prevent that. If we perform DROP OWNED BY on a role that is listed more than once, RemoveRoleFromObjectPolicy either suffered an assertion failure or encountered a tuple-updated-by-self error. Rewrite it to cope correctly with duplicate entries, and add a CommandCounterIncrement call to prevent the other problem. Per discussion, there's other cleanup that ought to happen here, but this seems like the minimum essential fix. Per bug #17062 from Alexander Lakhin. It's been broken all along, so back-patch to all supported branches. Discussion: https://postgr.es/m/17062-11f471ae3199ca23@postgresql.org
Diffstat (limited to 'src/backend/libpq/be-gssapi-common.c')
0 files changed, 0 insertions, 0 deletions