Re: running logical replication as the subscription owner

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: running logical replication as the subscription owner
Date: 2023-03-06 17:28:28
Message-ID: CAGECzQT3jeoqxSyxK-oU8oFFR+oLAu--D9cYr_bc0RB+B7ZLnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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).

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-03-06 17:36:50 Re: HOT chain validation in verify_heapam()
Previous Message Robert Haas 2023-03-06 17:10:23 Re: running logical replication as the subscription owner