Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Teach pg_dump about the new pg_subscription.subrunasowner option.

  1. pg_dump not dumping the run_as_owner setting from version 16?

    Philip Warner <pjw@rhyme.com.au> — 2023-10-27T04:25:30Z

    Hi,
    
    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.
    
    Sent from Mail for Windows
    
    
  2. RE: pg_dump not dumping the run_as_owner setting from version 16?

    Philip Warner <pjw@rhyme.com.au> — 2023-10-27T07:05:30Z

    Further to this: it seems that `Alter Subscription X Set(Run_As_Owner=True);` has no influence on the `subrunasowner` column of pg_subscriptions.
    
    Sent from Mail for Windows
    
    From: Philip Warner
    Sent: Friday, 27 October 2023 3:26 PM
    To: pgsql-hackers@lists.postgresql.org
    Subject: pg_dump not dumping the run_as_owner setting from version 16?
    
    Hi,
    
    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.
    
    Sent from Mail for Windows
    
    
    
  3. Re: pg_dump not dumping the run_as_owner setting from version 16?

    Laurenz Albe <laurenz.albe@cybertec.at> — 2023-10-27T07:52:31Z

    On Fri, 2023-10-27 at 18:05 +1100, Philip Warner wrote:
    > 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!
    
    
    > 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.
    
    Yours,
    Laurenz Albe
    
    
    
    
  4. RE: pg_dump not dumping the run_as_owner setting from version 16?

    Philip Warner <pjw@rhyme.com.au> — 2023-10-28T08:03:13Z

    > > 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.
    
  5. RE: pg_dump not dumping the run_as_owner setting from version 16?

    Philip Warner <pjw@rhyme.com.au> — 2023-10-28T08:54:18Z

    ...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.
    
  6. Re: pg_dump not dumping the run_as_owner setting from version 16?

    Tom Lane <tgl@sss.pgh.pa.us> — 2023-10-29T16:57:38Z

    Philip Warner <pjw@rhyme.com.au> writes:
    > 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.
    
    I think that's the correct choice.  Fix pushed, thanks.
    
    			regards, tom lane