-
Notifications
You must be signed in to change notification settings - Fork 874
Expand file tree
/
Copy pathPhysicalReplicationSlot.cs
More file actions
36 lines (32 loc) · 1.37 KB
/
PhysicalReplicationSlot.cs
File metadata and controls
36 lines (32 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using NpgsqlTypes;
namespace Npgsql.Replication;
/// <summary>
/// Wraps a replication slot that uses physical replication.
/// </summary>
public class PhysicalReplicationSlot : ReplicationSlot
{
/// <summary>
/// Creates a new <see cref="PhysicalReplicationSlot"/> instance.
/// </summary>
/// <remarks>
/// Create a <see cref="PhysicalReplicationSlot"/> instance with this constructor to wrap an existing PostgreSQL replication slot
/// that has been initialized for physical replication.
/// </remarks>
/// <param name="slotName">The name of the existing replication slot</param>
/// <param name="restartLsn">The replication slot's <c>restart_lsn</c></param>
/// <param name="restartTimeline">The timeline ID associated to <c>restart_lsn</c>, following the current timeline history.</param>
public PhysicalReplicationSlot(string slotName, NpgsqlLogSequenceNumber? restartLsn = null, uint? restartTimeline = null)
: base(slotName)
{
RestartLsn = restartLsn;
RestartTimeline = restartTimeline;
}
/// <summary>
/// The replication slot's <c>restart_lsn</c>.
/// </summary>
public NpgsqlLogSequenceNumber? RestartLsn { get; }
/// <summary>
/// The timeline ID associated to <c>restart_lsn</c>, following the current timeline history.
/// </summary>
public uint? RestartTimeline { get; }
}