pgsql: Add regression test for DROP OWNED BY with default ACLs

2021-01-19 Thread Michael Paquier
Add regression test for DROP OWNED BY with default ACLs DROP OWNED BY has a specific code path to remove ACLs stored in pg_default_acl when cleaning up shared dependencies that had no coverage with the existing tests. This issue has been found while digging into the bug fixed by 21378e1. As ALTE

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Fix ALTER DEFAULT PRIVILEGES with duplicated objects

2021-01-19 Thread Michael Paquier
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

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: Remove faulty support for MergeAppend plan with WHERE CURRENT OF

2021-01-19 Thread Tom Lane
Remove faulty support for MergeAppend plan with WHERE CURRENT OF. Somebody extended search_plan_tree() to treat MergeAppend exactly like Append, which is 100% wrong, because unlike Append we can't assume that only one input node is actively returning tuples. Hence a cursor using a MergeAppend acro

pgsql: pageinspect: Change block number arguments to bigint

2021-01-19 Thread Peter Eisentraut
pageinspect: Change block number arguments to bigint Block numbers are 32-bit unsigned integers. Therefore, the smallest SQL integer type that they can fit in is bigint. However, in the pageinspect module, most input and output parameters dealing with block numbers were declared as int. The beh