| From: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
|---|---|
| To: | cca5507 <2624345507(at)qq(dot)com>, Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: could sent_lsn be lower than write/flush/replay_lsn? |
| Date: | 2025-12-29 07:13:31 |
| Message-ID: | CAExHW5t2w58gV_cY_FK9zaEen+U4YmHTg5cY9QoP1OziwSfMLw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Jaime,
On Sat, Dec 27, 2025 at 1:18 PM cca5507 <2624345507(at)qq(dot)com> wrote:
>
> Hi Jaime,
>
> The $subject can happen during logical replication start, it's just fine.
>
> > 2025-12-26 12:17:41.861 -05 [pid=2667517;l=1;tx=0] LOG: 38B7/CEBC9330
> > has been already streamed, forwarding to 38B7/D2C9C038
>
> The logical replica requests starting at 38B7/CEBC9330, but the slot's confirmed_flush_lsn
> is at 38B7/D2C9C038, so forwarding to it.
>
> > 2025-12-26 12:17:41.867 -05 [pid=2667517;l=4;tx=0] DETAIL: Streaming
> > transactions committing after 38B7/D2C9C038, reading WAL from
> > 38B0/2261B890.
>
> The publisher must read WAL from the slot's restart_lsn (38B0/2261B890), but only
> transactions committed after 38B7/D2C9C038 will be sent to the logical replica.
>
> The sent_lsn is just where the wal sender currently reading, so it could be lower than
> write/flush/replay_lsn.
+1.
I guess, the logical replication is restarting in a loop. If that's
the case, you will find multiple errors happening in the loop. Another
guess is it's because of the walsender/receiver timeout. Do you see
timeout error from the corresponding background workers? What's
downstream?
--
Best Wishes,
Ashutosh Bapat
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jian he | 2025-12-29 07:17:42 | Re: domain for WITHOUT OVERLAPS |
| Previous Message | Zsolt Parragi | 2025-12-29 06:47:27 | Re: RFC: PostgreSQL Storage I/O Transformation Hooks |