Re: running logical replication as the subscription owner
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jelte Fennema <postgres@jeltef.nl>
Cc: Jeff Davis <pgsql@j-davis.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Andres Freund <andres@anarazel.de>, Noah Misch <noah@leadboat.com>
Date: 2023-03-30T18:17:31Z
Lists: pgsql-hackers
Attachments
- v3-0002-Add-a-run_as_owner-option-to-subscriptions.patch (application/octet-stream) patch v3-0002
- v3-0001-Perform-logical-replication-actions-as-the-table-.patch (application/octet-stream) patch v3-0001
On Thu, Mar 30, 2023 at 11:11 AM Jelte Fennema <postgres@jeltef.nl> wrote: > Regarding the actual patch. I think the code looks good. Mainly the > tests and docs are lacking for the new option. Like I said for the > tests you can borrow the tests I updated for my v2 patch, I think > those should work fine for the new option. I took a look at that but I didn't really feel like that was quite the direction I wanted to go. I'd actually like to separate the tests of the new option out into their own file, so that if for some reason we decide we want to remove it in the future, it's easier to nuke all the associated tests. Also, quite frankly, I think we've gone way overboard in terms of loading too many tests into a single file, with the result that it's very hard to understand exactly what and all the file is actually testing and what it's intended to be testing. So the attached 0002 does it that way. I've also amended 0001 and 0002 with documentation changes that I hope are appropriate. I noticed along the way that my earlier commits had missed one place that needed to be updated by the pg_create_subscription patch I created earlier. A fix for that is included in 0001, but it can be broken out and committed separately if somebody feels strongly about it. I personally don't think it's worth it. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Honor run_as_owner option in tablesync worker.
- a83edeaf684a 16.0 landed
-
Document new pg_subscription columns.
- bc25d6c54a00 16.0 landed
-
Add a run_as_owner option to subscriptions.
- 482675987bcd 16.0 landed
-
Perform logical replication actions as the table owner.
- 1e10d49b65d6 16.0 landed
-
Add new predefined role pg_create_subscription.
- c3afe8cf5a1e 16.0 cited
-
Respect permissions within logical replication.
- a2ab9c06ea15 15.0 cited
-
Empty search_path in logical replication apply worker and walsender.
- 11da97024abb 14.0 cited
-
Empty search_path in Autovacuum and non-psql/pgbench clients.
- 582edc369cdb 11.0 cited