On 25/09/2026 10:38, Marko Grujic wrote:
> On Fri, Sep 25, 2026 at 3:48 AM Michael Paquier <michael@paquier.xyz> wrote:
>> All these actions are doable only under a superuser, and there is an
>> argument over the existing behavior being useful, for example to clean
>> up orphaned objects post-crash-recovery.
>>
>> Superusers can do worse than that. For example issue a TRUNCATE on a
>> few catalogs like pg_database, with set allow_system_table_mods =
>> true. Now, that's much more interesting.
> In that case the superuser is opting-in to something explicitly dangerous.
I think Michael is right, superusers can do all sort of destructive
things -- I keep falling into this trap as well. I guess the trick here
for superusers would be "don't mess with the catalog unless you know
what you're doing" :)
Best, Jim