Versions in this module Expand all Collapse all v0 v0.5.5 Nov 24, 2026 Changes in this version + const OutputPlugin + const RetainedWALHardMultiple + func RetainedHardLimit(ceiling int64) int64 + type CatchupDeadlocks struct + BackingOff bool + Consecutive int type SlotLagCause + const SlotLagWALRetainedHardLimit + func (c SlotLagCause) RetainsWAL() bool type SlotLagExceededError + Deadlocks CatchupDeadlocks v0.5.4 Nov 20, 2026 Changes in this version type SlotLagExceededError + CopyPaced copier.Paced v0.5.3 Nov 16, 2026 v0.5.2 Nov 12, 2026 Changes in this version + const RestartReleaseInterval + type SlotLagCause string + const SlotLagStreamBehind + const SlotLagWALRetained type SlotLagExceededError + Cause SlotLagCause + Unconfirmed int64 + type SlotLagWatch struct + func NewSlotLagWatch(ceiling int64, grace time.Duration) (*SlotLagWatch, error) + func (w *SlotLagWatch) Judge(s SlotStatus, now time.Time) error type SlotStatus + Unconfirmed RetainedWAL v0.5.1 Nov 11, 2026 v0.5.0 Nov 8, 2026 v0.4.1 Nov 4, 2026 v0.4.0 Nov 3, 2026 Changes in this version + const DefaultSlotLagCeiling + const MarkerPrefix + const SlotNamePrefix + var ErrForeignDecodingState = errors.New("logical-decoding state of the derived name is not this route's") + var ErrInvariantViolation = dbconn.ErrInvariantViolation + var ErrSlotActive = errors.New("replication slot is held by another process") + var ErrSlotLagCeiling = errors.New("replication slot retains more WAL than the lag ceiling allows") + var ErrSlotLagUnknown = errors.New("replication slot's retained WAL cannot be measured") + var ErrSlotLost = errors.New("replication slot is lost") + var ErrSourceShapeChanged = errors.New("the source table's shape changed under the stream") + var ErrStreamEnded = errors.New("the server ended the replication stream") + var ErrUnsupportedChange = errors.New("the source table received a change the route does not replay") + func DropIdleSlot(ctx context.Context, cfg dbconn.Config, pool *pgxpool.Pool, name string) error + func DropSlot(ctx context.Context, cfg dbconn.Config, pool *pgxpool.Pool, name string) error + func IsEngineSlotName(name string) bool type ChangeEvent + Delivered LSN + Xid uint32 type Column + func AbsentColumn(name string) Column + func PresentColumn(name string, value any) Column + func (c Column) Get() (value any, present bool) + func (c Column) String() string + type Delivery struct + Change *ChangeEvent + Delivered LSN + type ForeignObject string + const ForeignObjectPublication + const ForeignObjectSlot + type ForeignStateError struct + Detail string + Name string + Object ForeignObject + func (e *ForeignStateError) Error() string + func (e *ForeignStateError) Unwrap() error + type InvalidationReason string + const InvalidationIdleTimeout + const InvalidationRowsRemoved + const InvalidationWALLevelInsufficient + const InvalidationWALRemoved type LSN + func MarkWAL(ctx context.Context, tx pgx.Tx) (LSN, error) + func ParseLSN(s string) (LSN, error) + type PublicationPrivilegeError struct + Database string + Err error + Privilege string + Publication string + func (e *PublicationPrivilegeError) Error() string + func (e *PublicationPrivilegeError) Unwrap() error + type RetainedWAL struct + Bytes int64 + Known bool + type Slot struct + func CreateSlot(ctx context.Context, cfg dbconn.Config, pool *pgxpool.Pool, ...) (*Slot, error) + func ReplaceSlot(ctx context.Context, cfg dbconn.Config, pool *pgxpool.Pool, ...) (*Slot, error) + func (s *Slot) Close(ctx context.Context) error + func (s *Slot) ConsistentPoint() LSN + func (s *Slot) Name() string + func (s *Slot) SnapshotName() string + type SlotExistsError struct + Name string + func (e *SlotExistsError) Error() string + type SlotInvalidation struct + Reason InvalidationReason + Reported bool + func (i SlotInvalidation) String() string + type SlotLagExceededError struct + Ceiling int64 + Retained int64 + Slot string + func (e *SlotLagExceededError) Error() string + func (e *SlotLagExceededError) Unwrap() error + type SlotLostError struct + Found bool + Invalidation SlotInvalidation + Slot string + WALStatus WALStatus + func (e *SlotLostError) Error() string + func (e *SlotLostError) Unwrap() error + type SlotStatus struct + Active bool + ActivePID int32 + ConfirmedFlushLSN LSN + Conflicting bool + Database string + InactiveSince time.Time + Invalidation SlotInvalidation + Logical bool + Name string + Own bool + RestartLSN LSN + Retained RetainedWAL + WALStatus WALStatus + func InspectSlot(ctx context.Context, db dbconn.RowQuerier, name string) (status SlotStatus, found bool, err error) + func (s SlotStatus) Lost() bool + func (s SlotStatus) LostState() *SlotLostError + func (s SlotStatus) WithinLagCeiling(ceiling int64) error + type Stream struct + func OpenStream(ctx context.Context, cfg dbconn.Config, catalog dbconn.RowQuerier, ...) (*Stream, error) + func (s *Stream) Close(ctx context.Context) error + func (s *Stream) Confirm(ctx context.Context, lsn LSN) error + func (s *Stream) Confirmed() LSN + func (s *Stream) Delivered() LSN + func (s *Stream) Next(ctx context.Context, wait time.Duration) (Delivery, error) + func (s *Stream) ServerWALEnd() LSN + func (s *Stream) Slot() string + func (s *Stream) Start() LSN + type WALStatus string + const WALStatusExtended + const WALStatusLost + const WALStatusReserved + const WALStatusUnreserved v0.3.3 Sep 16, 2026 v0.3.2 Sep 10, 2026 Changes in this version + type ChangeEvent struct + Columns []Column + Key int64 + Kind ChangeKind + LSN LSN + OldKey *int64 + func (e ChangeEvent) PresentColumns() []Column + type ChangeKind uint8 + const Delete + const Insert + const Update + func (k ChangeKind) String() string + type Column struct + Name string + Present bool + Value any + type LSN uint64 + func (l LSN) String() string