Re: running logical replication as the subscription owner
Jelte Fennema <postgres@jeltef.nl>
From: Jelte Fennema <postgres@jeltef.nl>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2023-03-06T17:28:28Z
Lists: pgsql-hackers
> Yeah. As Andres pointed out somewhere or other, that also means you're > decoding the WAL once per user instead of just once. I'm surprised > that hasn't been cost-prohibitive. We'd definitely prefer to have one subscription and do the decoding only once. But we haven't run into big perf issues with the current setup so far. We use it for non-blocking copying of shards (regular PG tables under the hood). Most of the time is usually spent in the initial copy phase, not the catchup. And also in practice our users often only have one table owning user (and more than 5 table owning users is extremely rare).
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