pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Expand AclMode to 64 bits
8+ messages / 5 participants
[nested] [flat]
Commits from this thread:
2022-11-24 2d1f3bce97 Fix some 32-bit shift warnings in MSVC
* pgsql: Expand AclMode to 64 bits
@ 2022-11-23 19:44 Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Re: pgsql: Expand AclMode to 64 bits Michael Paquier <michael@paquier.xyz>
2022-11-24 21:50 ` Re: pgsql: Expand AclMode to 64 bits David Rowley <dgrowleyml@gmail.com>
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Dunstan @ 2022-11-23 19:44 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Expand AclMode to 64 bits
We're running out of bits for new permissions. This change doubles the
number of permissions we can accomodate from 16 to 32, so the
forthcoming new ones for vacuum/analyze don't exhaust the pool.
Nathan Bossart
Reviewed by: Bharath Rupireddy, Kyotaro Horiguchi, Stephen Frost, Robert
Haas, Mark Dilger, Tom Lane, Corey Huinker, David G. Johnston, Michael
Paquier.
Discussion: https://postgr.es/m/20220722203735.GB3996698@nathanxps13
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7b378237aa805711353075de142021b1d40ff3b0
Modified Files
--------------
src/backend/nodes/outfuncs.c | 2 +-
src/bin/pg_upgrade/check.c | 35 +++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_type.dat | 4 ++--
src/include/nodes/parsenodes.h | 6 +++---
src/include/utils/acl.h | 28 ++++++++++++++--------------
6 files changed, 56 insertions(+), 21 deletions(-)
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
@ 2022-11-24 00:40 ` Michael Paquier <michael@paquier.xyz>
2022-11-24 01:18 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
1 sibling, 1 reply; 8+ messages in thread
From: Michael Paquier @ 2022-11-24 00:40 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org
Hi Andrew,
On Wed, Nov 23, 2022 at 07:44:04PM +0000, Andrew Dunstan wrote:
> Expand AclMode to 64 bits
>
> We're running out of bits for new permissions. This change doubles the
> number of permissions we can accomodate from 16 to 32, so the
> forthcoming new ones for vacuum/analyze don't exhaust the pool.
>
> Nathan Bossart
>
> Reviewed by: Bharath Rupireddy, Kyotaro Horiguchi, Stephen Frost, Robert
> Haas, Mark Dilger, Tom Lane, Corey Huinker, David G. Johnston, Michael
> Paquier.
crake is complaining for the upgrades from v12:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2022-11-23%2023%3A32%3A04
It seems that there are some tables dependent on aclitem, bumping on
your incompatible change.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Re: pgsql: Expand AclMode to 64 bits Michael Paquier <michael@paquier.xyz>
@ 2022-11-24 01:18 ` Andrew Dunstan <andrew@dunslane.net>
2022-11-25 06:52 ` Re: pgsql: Expand AclMode to 64 bits Amit Langote <amitlangote09@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Dunstan @ 2022-11-24 01:18 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: pgsql-committers@lists.postgresql.org
On 2022-11-23 We 19:40, Michael Paquier wrote:
> Hi Andrew,
>
> On Wed, Nov 23, 2022 at 07:44:04PM +0000, Andrew Dunstan wrote:
>> Expand AclMode to 64 bits
>>
>> We're running out of bits for new permissions. This change doubles the
>> number of permissions we can accomodate from 16 to 32, so the
>> forthcoming new ones for vacuum/analyze don't exhaust the pool.
>>
>> Nathan Bossart
>>
>> Reviewed by: Bharath Rupireddy, Kyotaro Horiguchi, Stephen Frost, Robert
>> Haas, Mark Dilger, Tom Lane, Corey Huinker, David G. Johnston, Michael
>> Paquier.
> crake is complaining for the upgrades from v12:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2022-11-23%2023%3A32%3A04
>
> It seems that there are some tables dependent on aclitem, bumping on
> your incompatible change.
Yeah, testing a fix for it, thanks.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Re: pgsql: Expand AclMode to 64 bits Michael Paquier <michael@paquier.xyz>
2022-11-24 01:18 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
@ 2022-11-25 06:52 ` Amit Langote <amitlangote09@gmail.com>
2022-11-25 14:00 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
0 siblings, 1 reply; 8+ messages in thread
From: Amit Langote @ 2022-11-25 06:52 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
Hi Andrew,
On Thu, Nov 24, 2022 at 10:18 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> On 2022-11-23 We 19:40, Michael Paquier wrote:
> > Hi Andrew,
> >
> > On Wed, Nov 23, 2022 at 07:44:04PM +0000, Andrew Dunstan wrote:
> >> Expand AclMode to 64 bits
> >>
> >> We're running out of bits for new permissions. This change doubles the
> >> number of permissions we can accomodate from 16 to 32, so the
> >> forthcoming new ones for vacuum/analyze don't exhaust the pool.
> >>
> >> Nathan Bossart
> >>
> >> Reviewed by: Bharath Rupireddy, Kyotaro Horiguchi, Stephen Frost, Robert
> >> Haas, Mark Dilger, Tom Lane, Corey Huinker, David G. Johnston, Michael
> >> Paquier.
> > crake is complaining for the upgrades from v12:
> > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2022-11-23%2023%3A32%3A04
> >
> > It seems that there are some tables dependent on aclitem, bumping on
> > your incompatible change.
>
> Yeah, testing a fix for it, thanks.
Not sure if it is related to the above, but I noticed a problem when
rebasing my patch that moves requiredPerms out of RangeTblEntry. I
think the commit may have missed doing the following (diff attached):
diff --git a/src/backend/nodes/gen_node_support.pl
b/src/backend/nodes/gen_node_support.pl
index d3f25299de..b6f086e262 100644
inline patch 1: src/backend/nodes/gen_node_support.pl (+2/-2 lines) download inline-1.patch
--- a/src/backend/nodes/gen_node_support.pl
+++ b/src/backend/nodes/gen_node_support.pl
@@ -954,7 +954,6 @@ _read${n}(void)
}
elsif ($t eq 'uint32'
|| $t eq 'bits32'
- || $t eq 'AclMode'
|| $t eq 'BlockNumber'
|| $t eq 'Index'
|| $t eq 'SubTransactionId')
@@ -962,7 +961,8 @@ _read${n}(void)
print $off "\tWRITE_UINT_FIELD($f);\n";
print $rff "\tREAD_UINT_FIELD($f);\n" unless $no_read;
}
- elsif ($t eq 'uint64')
+ elsif ($t eq 'uint64'
+ || $t eq 'AclMode')
{
print $off "\tWRITE_UINT64_FIELD($f);\n";
print $rff "\tREAD_UINT64_FIELD($f);\n" unless $no_read;
--
Thanks, Amit Langote
EDB: http://www.enterprisedb.com
Patches and attachments: download all (2 files, .tar.gz)
AclMode-node-support.diff (application/octet-stream, 738B) download
diff --git a/src/backend/nodes/gen_node_support.pl b/src/backend/nodes/gen_node_support.pl
index d3f25299de..b6f086e262 100644
--- a/src/backend/nodes/gen_node_support.pl
+++ b/src/backend/nodes/gen_node_support.pl
@@ -954,7 +954,6 @@ _read${n}(void)
}
elsif ($t eq 'uint32'
|| $t eq 'bits32'
- || $t eq 'AclMode'
|| $t eq 'BlockNumber'
|| $t eq 'Index'
|| $t eq 'SubTransactionId')
@@ -962,7 +961,8 @@ _read${n}(void)
print $off "\tWRITE_UINT_FIELD($f);\n";
print $rff "\tREAD_UINT_FIELD($f);\n" unless $no_read;
}
- elsif ($t eq 'uint64')
+ elsif ($t eq 'uint64'
+ || $t eq 'AclMode')
{
print $off "\tWRITE_UINT64_FIELD($f);\n";
print $rff "\tREAD_UINT64_FIELD($f);\n" unless $no_read;
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Re: pgsql: Expand AclMode to 64 bits Michael Paquier <michael@paquier.xyz>
2022-11-24 01:18 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-25 06:52 ` Re: pgsql: Expand AclMode to 64 bits Amit Langote <amitlangote09@gmail.com>
@ 2022-11-25 14:00 ` Andrew Dunstan <andrew@dunslane.net>
2022-12-02 00:54 ` Re: pgsql: Expand AclMode to 64 bits Thomas Munro <thomas.munro@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Dunstan @ 2022-11-25 14:00 UTC (permalink / raw)
To: Amit Langote <amitlangote09@gmail.com>; +Cc: Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
On 2022-11-25 Fr 01:52, Amit Langote wrote:
> Hi Andrew,
>
> On Thu, Nov 24, 2022 at 10:18 AM Andrew Dunstan <andrew@dunslane.net> wrote:
>> On 2022-11-23 We 19:40, Michael Paquier wrote:
>>> Hi Andrew,
>>>
>>> On Wed, Nov 23, 2022 at 07:44:04PM +0000, Andrew Dunstan wrote:
>>>> Expand AclMode to 64 bits
>>>>
>>>> We're running out of bits for new permissions. This change doubles the
>>>> number of permissions we can accomodate from 16 to 32, so the
>>>> forthcoming new ones for vacuum/analyze don't exhaust the pool.
>>>>
>>>> Nathan Bossart
>>>>
>>>> Reviewed by: Bharath Rupireddy, Kyotaro Horiguchi, Stephen Frost, Robert
>>>> Haas, Mark Dilger, Tom Lane, Corey Huinker, David G. Johnston, Michael
>>>> Paquier.
>>> crake is complaining for the upgrades from v12:
>>> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2022-11-23%2023%3A32%3A04
>>>
>>> It seems that there are some tables dependent on aclitem, bumping on
>>> your incompatible change.
>> Yeah, testing a fix for it, thanks.
> Not sure if it is related to the above, but I noticed a problem when
> rebasing my patch that moves requiredPerms out of RangeTblEntry. I
> think the commit may have missed doing the following (diff attached):
pushed, thanks.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Re: pgsql: Expand AclMode to 64 bits Michael Paquier <michael@paquier.xyz>
2022-11-24 01:18 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-25 06:52 ` Re: pgsql: Expand AclMode to 64 bits Amit Langote <amitlangote09@gmail.com>
2022-11-25 14:00 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
@ 2022-12-02 00:54 ` Thomas Munro <thomas.munro@gmail.com>
2022-12-02 02:55 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Munro @ 2022-12-02 00:54 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: Amit Langote <amitlangote09@gmail.com>; Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
On Sat, Nov 26, 2022 at 3:00 AM Andrew Dunstan <andrew@dunslane.net> wrote:
> >>> crake is complaining for the upgrades from v12:
> >>> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2022-11-23%2023%3A32%3A04
> >>>
> >>> It seems that there are some tables dependent on aclitem, bumping on
> >>> your incompatible change.
> pushed, thanks.
crake is green, but three sparc boxes are red with the same sort of
Xversion failure, I think?
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Re: pgsql: Expand AclMode to 64 bits Michael Paquier <michael@paquier.xyz>
2022-11-24 01:18 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-25 06:52 ` Re: pgsql: Expand AclMode to 64 bits Amit Langote <amitlangote09@gmail.com>
2022-11-25 14:00 ` Re: pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-12-02 00:54 ` Re: pgsql: Expand AclMode to 64 bits Thomas Munro <thomas.munro@gmail.com>
@ 2022-12-02 02:55 ` Andrew Dunstan <andrew@dunslane.net>
0 siblings, 0 replies; 8+ messages in thread
From: Andrew Dunstan @ 2022-12-02 02:55 UTC (permalink / raw)
To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Amit Langote <amitlangote09@gmail.com>; Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
On 2022-12-01 Th 19:54, Thomas Munro wrote:
> On Sat, Nov 26, 2022 at 3:00 AM Andrew Dunstan <andrew@dunslane.net> wrote:
>>>>> crake is complaining for the upgrades from v12:
>>>>> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake&dt=2022-11-23%2023%3A32%3A04
>>>>>
>>>>> It seems that there are some tables dependent on aclitem, bumping on
>>>>> your incompatible change.
>> pushed, thanks.
> crake is green, but three sparc boxes are red with the same sort of
> Xversion failure, I think?
Yeah, there is a fix committed, see
<https://github.com/PGBuildFarm/client-code/commit/a6149f413c9387c331b2744008706903ce171584;
which crake and other animals have been testing.
I will publish a new release very soon.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: pgsql: Expand AclMode to 64 bits
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
@ 2022-11-24 21:50 ` David Rowley <dgrowleyml@gmail.com>
1 sibling, 0 replies; 8+ messages in thread
From: David Rowley @ 2022-11-24 21:50 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org
On Thu, 24 Nov 2022 at 08:44, Andrew Dunstan <andrew@dunslane.net> wrote:
> Expand AclMode to 64 bits
I noticed this causes a few new warnings on MSVC:
acl.c(629): warning C4334: '<<': result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
acl.c(631): warning C4334: '<<': result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
acl.c(1789): warning C4334: '<<': result of 32-bit shift implicitly
converted to 64 bits (was 64-bit shift intended?)
The attached fixes. I'll push this shortly.
David
Attachments:
fix_32-bit_shift_warning_on_msvc.patch (text/plain, 743B) download
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index d4d68f9724..f8eedfe170 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -626,9 +626,9 @@ aclitemout(PG_FUNCTION_ARGS)
for (i = 0; i < N_ACL_RIGHTS; ++i)
{
- if (ACLITEM_GET_PRIVS(*aip) & (1 << i))
+ if (ACLITEM_GET_PRIVS(*aip) & (UINT64CONST(1) << i))
*p++ = ACL_ALL_RIGHTS_STR[i];
- if (ACLITEM_GET_GOPTIONS(*aip) & (1 << i))
+ if (ACLITEM_GET_GOPTIONS(*aip) & (UINT64CONST(1) << i))
*p++ = '*';
}
@@ -1786,7 +1786,7 @@ aclexplode(PG_FUNCTION_ARGS)
break;
}
aidata = &aidat[idx[0]];
- priv_bit = 1 << idx[1];
+ priv_bit = UINT64CONST(1) << idx[1];
if (ACLITEM_GET_PRIVS(*aidata) & priv_bit)
{
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2022-12-02 02:55 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 19:44 pgsql: Expand AclMode to 64 bits Andrew Dunstan <andrew@dunslane.net>
2022-11-24 00:40 ` Michael Paquier <michael@paquier.xyz>
2022-11-24 01:18 ` Andrew Dunstan <andrew@dunslane.net>
2022-11-25 06:52 ` Amit Langote <amitlangote09@gmail.com>
2022-11-25 14:00 ` Andrew Dunstan <andrew@dunslane.net>
2022-12-02 00:54 ` Thomas Munro <thomas.munro@gmail.com>
2022-12-02 02:55 ` Andrew Dunstan <andrew@dunslane.net>
2022-11-24 21:50 ` David Rowley <dgrowleyml@gmail.com>
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