Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d36d9f

Browse files
committed
Report WAL flush, not insert, position in replication IDENTIFY_SYSTEM
When beginning streaming replication, the client usually issues theIDENTIFY_SYSTEM command, which used to return the current WAL insertposition. That's not suitable for the intended purpose of that field,however. pg_receivexlog uses it to start replication from the reportedpoint, but if it hasn't been flushed to disk yet, it will fail. ChangeIDENTIFY_SYSTEM to report the flush position instead.Backpatch to 9.1 and above. 9.0 doesn't report any WAL position.
1 parent490a918 commit0d36d9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎doc/src/sgml/protocol.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ The commands accepted in walsender mode are:
13531353
</term>
13541354
<listitem>
13551355
<para>
1356-
Current xlogwrite location. Useful to get a known location in the
1356+
Current xlogflush location. Useful to get a known location in the
13571357
transaction log where streaming can start.
13581358
</para>
13591359
</listitem>

‎src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ IdentifySystem(void)
289289
GetSystemIdentifier());
290290
snprintf(tli,sizeof(tli),"%u",ThisTimeLineID);
291291

292-
logptr=GetInsertRecPtr();
292+
logptr=GetFlushRecPtr();
293293

294294
snprintf(xpos,sizeof(xpos),"%X/%X",
295295
logptr.xlogid,logptr.xrecoff);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp