StandbyStatusUpdateMessage constructor

StandbyStatusUpdateMessage({
  1. required LSN walWritePosition,
  2. LSN? walFlushPosition,
  3. LSN? walApplyPosition,
  4. DateTime? clientTime,
  5. bool mustReply = false,
})

StandbyStatusUpdate to the PostgreSQL server.

The only required field is walWritePosition. If either walFlushPosition or walApplyPosition are null, walWritePosition will be assigned to them. If clientTime is not given, then the current time is used.

When sending this message, it must be wrapped within CopyDataMessage

Implementation

StandbyStatusUpdateMessage({
  required this.walWritePosition,
  LSN? walFlushPosition,
  LSN? walApplyPosition,
  DateTime? clientTime,
  this.mustReply = false,
}) {
  this.walFlushPosition = walFlushPosition ?? walWritePosition;
  this.walApplyPosition = walApplyPosition ?? walWritePosition;
  this.clientTime = clientTime ?? DateTime.now().toUtc();
}