Re: DROP ROLE as SUPERUSER

2025-02-20 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Feb 20, 2025 at 9:05 AM Tom Lane wrote: >> It used to be that if a superuser issued GRANT/REVOKE, the operation >> was silently done as the owner of the affected object. > That is still the case according to the docs (REVOKE): [ scratches head ... ] I thou

Re: DROP ROLE as SUPERUSER

2025-02-20 Thread David G. Johnston
On Thu, Feb 20, 2025 at 9:21 AM Dominique Devienne wrote: > But that's not much better. It's basically like the SET ROLE to the > GRANTOR I did. > I guess what I want is GRANTED BY ANYONE! And not have to figure out > GRANTOR(s). > Your stated use case is dropping a role. Does the combination o

Re: DROP ROLE as SUPERUSER

2025-02-20 Thread David G. Johnston
On Thursday, February 20, 2025, Dominique Devienne wrote: > Hi. Today I was surprised that REVOKE ALL ON DATABASE FROM ROLE silently > did nothing, even with CASCADE, when I was running it as SUPERUSER, > preventing DROP'ing the ROLE. I had to manually SET ROLE to the GRANTOR, do > the REVOKE, wh

Re: DROP ROLE as SUPERUSER

2025-02-20 Thread David G. Johnston
On Thu, Feb 20, 2025 at 9:05 AM Tom Lane wrote: > "David G. Johnston" writes: > > On Thursday, February 20, 2025, Dominique Devienne > > wrote: > >> Hi. Today I was surprised that REVOKE ALL ON DATABASE FROM ROLE silently > >> did nothing, even with CASCADE, when I was running it as SUPERUSER,

Re: #XX000: ERROR: tuple concurrently updated

2025-02-20 Thread Tom Lane
Dominique Devienne writes: > Hi. A tester just tried to restore two custom backups (not official > PostgreSQL ones) concurrently. > ... > The second session completed OK. > But the first session errors out with: > Error: DDL Error: GRANT USAGE ON SCHEMA "SCH1", "SCH2" TO "SCH2:RO", > "SCH2:RW", "

Re: DROP ROLE as SUPERUSER

2025-02-20 Thread Dominique Devienne
On Thu, Feb 20, 2025 at 5:05 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thursday, February 20, 2025, Dominique Devienne > > wrote: > >> Hi. Today I was surprised that REVOKE ALL ON DATABASE FROM ROLE silently > >> did nothing, even with CASCADE, when I was running it as SUPERUSER,

Re: v18 virtual columns

2025-02-20 Thread Adrian Klaver
On 2/20/25 05:06, Dominique Devienne wrote: Hi. I've just read https://www.dbi-services.com/blog/postgresql-18-virtual-generated-columns/ and I'm wondering whether there will be a way to ALTER existing STORED generate

Re: #XX000: ERROR: tuple concurrently updated

2025-02-20 Thread Greg Sabino Mullane
Since you are willing to break the all one transaction rule, and if the restores were created via pg_dump, you could use the --section argument to split things up, run the "pre-data" sections serially, and the rest ("data" and "post-data") concurrently. -- Cheers, Greg -- Crunchy Data - https://

Re: DROP ROLE as SUPERUSER

2025-02-20 Thread Tom Lane
"David G. Johnston" writes: > On Thursday, February 20, 2025, Dominique Devienne > wrote: >> Hi. Today I was surprised that REVOKE ALL ON DATABASE FROM ROLE silently >> did nothing, even with CASCADE, when I was running it as SUPERUSER, >> preventing DROP'ing the ROLE. I had to manually SET ROLE

Re: DROP ROLE as SUPERUSER

2025-02-20 Thread David G. Johnston
On Thursday, February 20, 2025, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thursday, February 20, 2025, Dominique Devienne > wrote: > >> Hi. Today I was surprised that REVOKE ALL ON DATABASE FROM ROLE silently >> did nothing, even with CASCADE, when I was running it as SUPERUSER,

DROP ROLE as SUPERUSER

2025-02-20 Thread Dominique Devienne
Hi. Today I was surprised that REVOKE ALL ON DATABASE FROM ROLE silently did nothing, even with CASCADE, when I was running it as SUPERUSER, preventing DROP'ing the ROLE. I had to manually SET ROLE to the GRANTOR, do the REVOKE, which DID something this time, and then I could DROP the role. That's

Re: #XX000: ERROR: tuple concurrently updated

2025-02-20 Thread Dominique Devienne
On Thu, Feb 20, 2025 at 4:27 PM Tom Lane wrote: > Dominique Devienne writes: > > Hi. A tester just tried to restore two custom backups (not official > > PostgreSQL ones) concurrently. > > ... > > The second session completed OK. > > But the first session errors out with: > > > Error: DDL Error:

#XX000: ERROR: tuple concurrently updated

2025-02-20 Thread Dominique Devienne
Hi. A tester just tried to restore two custom backups (not official PostgreSQL ones) concurrently. The restore process creates a new schema, some roles,and does some role-to-role grants, before loading the data. The two restores are independent, i.e. create different non-overlapping schemas. But b

Re: v18 virtual columns

2025-02-20 Thread Dominique Devienne
On Thu, Feb 20, 2025 at 3:31 PM Ron Johnson wrote: > On Thu, Feb 20, 2025 at 8:07 AM Dominique Devienne > wrote: > >> Hi. I've just read >> https://www.dbi-services.com/blog/postgresql-18-virtual-generated-columns/ >> >> and I'm wondering whether there will be a way to ALTER existing STORED >> g

Re: v18 virtual columns

2025-02-20 Thread Ron Johnson
On Thu, Feb 20, 2025 at 8:07 AM Dominique Devienne wrote: > Hi. I've just read > https://www.dbi-services.com/blog/postgresql-18-virtual-generated-columns/ > > and I'm wondering whether there will be a way to ALTER existing STORED > generated columns, to be virtual? W/o rewriting the whole table

v18 virtual columns

2025-02-20 Thread Dominique Devienne
Hi. I've just read https://www.dbi-services.com/blog/postgresql-18-virtual-generated-columns/ and I'm wondering whether there will be a way to ALTER existing STORED generated columns, to be virtual? W/o rewriting the whole table that is. Thanks, --DD

Re: ERROR: stack depth limit exceeded

2025-02-20 Thread Laurenz Albe
On Wed, 2025-02-19 at 16:49 +0100, Csányi Pál wrote: > the trigger function definition is like: > [...] > INSERT INTO >     HAVONKENTI_MEGTAKARITASAINK (EZEN_IDOKOZBEN, MEGTAKARITVA_RSD, KELT) > [...] > > and the trigger definition is like: > CREATE OR REPLACE TRIGGER uj_nyugdij_beirasakor_kiold >

Re: Logical decoding

2025-02-20 Thread Tomas Vondra
On 2/20/25 06:04, Jethish Jethish wrote: > Hi everyone, > > Is there is any option to perform logical decoding on an active > replication slot. > I'm trying to decode a replication slot but it throughs an error as below. > > ERROR: replication slot "my_sub" is active for PID 2525720 No, not real