RE: pg_dump not dumping the run_as_owner setting from version 16?

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: pg_dump not dumping the run_as_owner setting from version 16?
Date: 2023-10-28 08:54:18
Message-ID: 20231028085427.5DA3A220F0B@thebes.rime.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

...patch actually attached this time...

> > I as far as I can tell, pg_dump does not dup the ‘run_as_owner` setting for a subscription.
> >
> > Should it? Should I submit a patch? It seems pretty trivial to fix if anyone else is working on it.
>
> Yes, it certainly should.  That is an omission in 482675987b.
> Go ahead and write a fix!

Please find attached a patch for pg_dump to honour the setting of `run_as_owner`; I believe that effective pre-16 behavious was to run as owner, so I have set the flag to ‘t’ for pre-16 versions. Please let me know if you would prefer the opposite.

> > Further to this: it seems that `Alter Subscription X Set(Run_As_Owner=True);`
> > has no influence on the `subrunasowner` column of pg_subscriptions.
>
> This seems to have been fixed in f062cddafe.

Yes, I can confirm that in the current head `pg_subscriptions` reflects the setting correctly.

Attachment Content-Type Size
pg_dump-run_as_owner.patch application/octet-stream 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2023-10-28 08:56:42 Re: [PoC] Improve dead tuple storage for lazy vacuum
Previous Message Laurenz Albe 2023-10-28 08:53:58 Re: unnest multirange, returned order