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

Commit902a2c2

Browse files
committed
Remove useless code from CreateReplicationSlot.
According to the comments, we initialize sendTimeLineIsHistoricand sendTimeLine here for the benefit of WalSndSegmentOpen.However, the only way that can happen is if logical_read_xlog_pagecalls WALRead. And since logical_read_xlog_page initializes thesame global variables internally, we don't need to also do it here.These initializations have been here since replication slots wereintroduced in commit858ec11. Theywere certainly useless at that time, too, because logical decodingdidn't yet exist then, and physical replication doesn't examine anyWAL at the time of slot creation. I haven't checked all theintermediate versions, but I suspect there's no point at whichthis code ever did anything useful.To reduce future confusion, remove the code. Since there's nofunctional defect, no back-patch.Discussion:http://postgr.es/m/CA+TgmobSWzacEs+r6C-7DrOPDHoDar4i9gzxB3SCBr5qjnLmVQ@mail.gmail.com
1 parent18e0913 commit902a2c2

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

‎src/backend/replication/walsender.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,10 +1042,6 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
10421042

10431043
parseCreateReplSlotOptions(cmd,&reserve_wal,&snapshot_action,&two_phase);
10441044

1045-
/* setup state for WalSndSegmentOpen */
1046-
sendTimeLineIsHistoric= false;
1047-
sendTimeLine=ThisTimeLineID;
1048-
10491045
if (cmd->kind==REPLICATION_KIND_PHYSICAL)
10501046
{
10511047
ReplicationSlotCreate(cmd->slotname, false,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp