On 8/25/26 9:43 PM, cca5507 wrote:
I also confirmed that the patch fixes the reported issue. But,
during that test, I found that pg_stat_wal_receiver.slot_name became
NULL after a timeline switch.

I think this can happen because RequestXLogStreaming() clears
walrcv->slotname when primary_slot_name is not configured.
The walreceiver then does not write the existing temporary slot name
back to shared memory because create_temp_slot is already false.
Then, streaming continues to use the temporary slot, but
pg_stat_wal_receiver.slot_name can show NULL.

Good catch, fixed.


v2 can show the correct slot_name.

Perform TAP tests using the original and v1 versions of walreceiver.c along with 004_timeline_switch.pl. Both issues (creation error and NULL slot_name) were reported correctly.

--
Quan Zongliang



Reply via email to