Skip to content

Commit 6f1d723

Browse files
committed
Fix crash in pg_replication_slot_advance
We were trying to use a LSN variable after releasing its containing slot structure. Reported by: tushar Author: amul sul Reviewed-by: Petr Jelinek, Masahiko Sawada Discussion: https://postgr.es/m/94ba999c-f76a-0423-6523-b8d531dfe4c7@enterprisedb.com
1 parent 159efe4 commit 6f1d723

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/backend/replication/slotfuncs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,7 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
480480
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
481481
errmsg("cannot move slot to %X/%X, minimum is %X/%X",
482482
(uint32) (moveto >> 32), (uint32) moveto,
483-
(uint32) (MyReplicationSlot->data.confirmed_flush >> 32),
484-
(uint32) (MyReplicationSlot->data.confirmed_flush))));
483+
(uint32) (startlsn >> 32), (uint32) startlsn)));
485484
}
486485

487486
if (OidIsValid(MyReplicationSlot->data.database))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy