forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathXLogDataMessage.cs
More file actions
34 lines (29 loc) · 1.22 KB
/
XLogDataMessage.cs
File metadata and controls
34 lines (29 loc) · 1.22 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
using System;
using System.IO;
using NpgsqlTypes;
namespace Npgsql.Replication;
/// <summary>
/// A message representing a section of the WAL data stream.
/// </summary>
public class XLogDataMessage : ReplicationMessage
{
/// <summary>
/// A section of the WAL data stream that is raw WAL data in physical replication or decoded with the selected
/// logical decoding plugin in logical replication. It is only valid until the next <see cref="XLogDataMessage"/>
/// is requested from the stream.
/// </summary>
/// <remarks>
/// A single WAL record is never split across two XLogData messages.
/// When a WAL record crosses a WAL page boundary, and is therefore already split using continuation records,
/// it can be split at the page boundary. In other words, the first main WAL record and its continuation
/// records can be sent in different XLogData messages.
/// </remarks>
public Stream Data { get; private set; } = default!;
internal XLogDataMessage Populate(
NpgsqlLogSequenceNumber walStart, NpgsqlLogSequenceNumber walEnd, DateTime serverClock, Stream data)
{
base.Populate(walStart, walEnd, serverClock);
Data = data;
return this;
}
}