pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/21378e1fefedcaed3d855ae7aa772555295d05d6

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/31e0f9d76bb0196b92f6870a8e1e3e2a4e5e2b28

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5ad672fc2f6541ec5a0c533fd44d3819bff1447a

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1c3a4d44d84437b40e8311a0810d2a189e54e291

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/74ee3abcfefa6e6b0756f85baa31a7ae21bb2fec

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7dc3be9df86cfd2515e76c078347dccc9a929d0b

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects
@ 2021-01-20 02:42 Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 7+ messages in thread

From: Michael Paquier @ 2021-01-20 02:42 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix ALTER DEFAULT PRIVILEGES with duplicated objects

Specifying duplicated objects in this command would lead to unique
constraint violations in pg_default_acl or "tuple already updated by
self" errors.  Similarly to GRANT/REVOKE, increment the command ID after
each subcommand processing to allow this case to work transparently.

A regression test is added by tweaking one of the existing queries of
privileges.sql to stress this case.

Reported-by: Andrus
Author: Michael Paquier
Reviewed-by: Álvaro Herrera
Discussion: https://postgr.es/m/ae2a7dc1-9d71-8cba-3bb9-e4cb7eb1f44e@hot.ee
Backpatch-through: 9.5

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0ddb529cf3e25afd94abf85aa3688b9d9063897c

Modified Files
--------------
src/backend/catalog/aclchk.c             | 3 +++
src/test/regress/expected/privileges.out | 3 ++-
src/test/regress/sql/privileges.sql      | 3 ++-
3 files changed, 7 insertions(+), 2 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2021-01-20 02:42 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>
2021-01-20 02:42 pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects Michael Paquier <michael@paquier.xyz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox