Re: Walreceiver create temp slot more than once when timeline switch

From: Quan Zongliang <quanzongliang(at)yeah(dot)net>
To: cca5507 <cca5507(at)qq(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Walreceiver create temp slot more than once when timeline switch
Date: 2026-08-24 23:57:38
Message-ID: 80e17404-f0a9-4ba7-b722-e2ba2f9e47f5@yeah.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/22/26 11:12 PM, cca5507 wrote:

>
> Logs of standby
> ===============
>
> 2026-08-22 22:59:08.663 CST [49194] LOG: started streaming WAL from primary at 0/03000000 on timeline 1
> 2026-08-22 22:59:08.674 CST [49194] LOG: replication terminated by primary server
> 2026-08-22 22:59:08.674 CST [49194] DETAIL: End of WAL reached on timeline 1 at 0/03052948.
> 2026-08-22 22:59:08.677 CST [49193] LOG: new target timeline is 2
> 2026-08-22 22:59:08.677 CST [49193] LOG: invalid record length at 0/03052948: expected at least 24, got 0
> 2026-08-22 22:59:08.678 CST [49194] FATAL: could not create replication slot "pg_walreceiver_49195": ERROR: replication slot "pg_walreceiver_49195" already exists
> 2026-08-22 22:59:08.682 CST [49196] LOG: started streaming WAL from primary at 0/03000000 on timeline 2
>
The bug has been reproduced.

> Fix
> ===
>
> Make sure that the walreceiver creates temp slot only once.
After testing, it was confirmed that it did not occur again. I'm
planning to conduct another long-term test.

>
> Thoughts?
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Quan Zongliang 2026-08-25 01:01:58 Re: Walreceiver create temp slot more than once when timeline switch
Previous Message Peter Smith 2026-08-24 23:45:59 Re: [PATCH] Refactor parse_publication_options