Skip to content

Commit

Permalink
Only providing applied LSN (processed and pushed) to PG
Browse files Browse the repository at this point in the history
  • Loading branch information
noctarius committed Jul 9, 2023
1 parent b4bf054 commit b2a7eff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/replication/context/replicationconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ func (rc *ReplicationConnection) ReceiveMessage(deadline time.Time) (pgproto3.Ba
}

func (rc *ReplicationConnection) SendStatusUpdate() error {
receivedLSN, processedLSN := rc.replicationContext.positionLSNs()
/*receivedLSN*/ _, processedLSN := rc.replicationContext.positionLSNs()
if err := pglogrepl.SendStandbyStatusUpdate(context.Background(), rc.conn,
pglogrepl.StandbyStatusUpdate{
WALWritePosition: pglogrepl.LSN(receivedLSN),
WALFlushPosition: pglogrepl.LSN(processedLSN),
WALWritePosition: pglogrepl.LSN(processedLSN),
WALApplyPosition: pglogrepl.LSN(processedLSN),
},
); err != nil {
rc.logger.Fatalln("SendStandbyStatusUpdate failed:", err)
Expand Down

0 comments on commit b2a7eff

Please sign in to comment.