mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Simplify printing of LSNs
Add a macro LSN_FORMAT_ARGS for use in printf-style printing of LSNs. Convert all applicable code to use it. Reviewed-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/CAExHW5ub5NaTELZ3hJUCE6amuvqAtsSxc7O+uK7y4t9Rrk23cw@mail.gmail.com
This commit is contained in:
@@ -277,8 +277,8 @@ AddWALInfoToBackupManifest(backup_manifest_info *manifest, XLogRecPtr startptr,
|
||||
"%s{ \"Timeline\": %u, \"Start-LSN\": \"%X/%X\", \"End-LSN\": \"%X/%X\" }",
|
||||
first_wal_range ? "" : ",\n",
|
||||
entry->tli,
|
||||
(uint32) (tl_beginptr >> 32), (uint32) tl_beginptr,
|
||||
(uint32) (endptr >> 32), (uint32) endptr);
|
||||
LSN_FORMAT_ARGS(tl_beginptr),
|
||||
LSN_FORMAT_ARGS(endptr));
|
||||
|
||||
if (starttli == entry->tli)
|
||||
{
|
||||
|
@@ -1075,7 +1075,7 @@ SendXlogRecPtrResult(XLogRecPtr ptr, TimeLineID tli)
|
||||
pq_sendint16(&buf, 2); /* number of columns */
|
||||
|
||||
len = snprintf(str, sizeof(str),
|
||||
"%X/%X", (uint32) (ptr >> 32), (uint32) ptr);
|
||||
"%X/%X", LSN_FORMAT_ARGS(ptr));
|
||||
pq_sendint32(&buf, len);
|
||||
pq_sendbytes(&buf, str, len);
|
||||
|
||||
|
@@ -406,9 +406,7 @@ libpqrcv_startstreaming(WalReceiverConn *conn,
|
||||
if (options->logical)
|
||||
appendStringInfoString(&cmd, " LOGICAL");
|
||||
|
||||
appendStringInfo(&cmd, " %X/%X",
|
||||
(uint32) (options->startpoint >> 32),
|
||||
(uint32) options->startpoint);
|
||||
appendStringInfo(&cmd, " %X/%X", LSN_FORMAT_ARGS(options->startpoint));
|
||||
|
||||
/*
|
||||
* Additional options are different depending on if we are doing logical
|
||||
|
@@ -514,9 +514,8 @@ CreateDecodingContext(XLogRecPtr start_lsn,
|
||||
* replication.
|
||||
*/
|
||||
elog(DEBUG1, "cannot stream from %X/%X, minimum is %X/%X, forwarding",
|
||||
(uint32) (start_lsn >> 32), (uint32) start_lsn,
|
||||
(uint32) (slot->data.confirmed_flush >> 32),
|
||||
(uint32) slot->data.confirmed_flush);
|
||||
LSN_FORMAT_ARGS(start_lsn),
|
||||
LSN_FORMAT_ARGS(slot->data.confirmed_flush));
|
||||
|
||||
start_lsn = slot->data.confirmed_flush;
|
||||
}
|
||||
@@ -538,10 +537,8 @@ CreateDecodingContext(XLogRecPtr start_lsn,
|
||||
(errmsg("starting logical decoding for slot \"%s\"",
|
||||
NameStr(slot->data.name)),
|
||||
errdetail("Streaming transactions committing after %X/%X, reading WAL from %X/%X.",
|
||||
(uint32) (slot->data.confirmed_flush >> 32),
|
||||
(uint32) slot->data.confirmed_flush,
|
||||
(uint32) (slot->data.restart_lsn >> 32),
|
||||
(uint32) slot->data.restart_lsn)));
|
||||
LSN_FORMAT_ARGS(slot->data.confirmed_flush),
|
||||
LSN_FORMAT_ARGS(slot->data.restart_lsn))));
|
||||
|
||||
return ctx;
|
||||
}
|
||||
@@ -567,8 +564,7 @@ DecodingContextFindStartpoint(LogicalDecodingContext *ctx)
|
||||
XLogBeginRead(ctx->reader, slot->data.restart_lsn);
|
||||
|
||||
elog(DEBUG1, "searching for logical decoding starting point, starting at %X/%X",
|
||||
(uint32) (slot->data.restart_lsn >> 32),
|
||||
(uint32) slot->data.restart_lsn);
|
||||
LSN_FORMAT_ARGS(slot->data.restart_lsn));
|
||||
|
||||
/* Wait for a consistent starting point */
|
||||
for (;;)
|
||||
@@ -688,8 +684,7 @@ output_plugin_error_callback(void *arg)
|
||||
NameStr(state->ctx->slot->data.name),
|
||||
NameStr(state->ctx->slot->data.plugin),
|
||||
state->callback_name,
|
||||
(uint32) (state->report_location >> 32),
|
||||
(uint32) state->report_location);
|
||||
LSN_FORMAT_ARGS(state->report_location));
|
||||
else
|
||||
errcontext("slot \"%s\", output plugin \"%s\", in the %s callback",
|
||||
NameStr(state->ctx->slot->data.name),
|
||||
@@ -1623,8 +1618,8 @@ LogicalIncreaseRestartDecodingForSlot(XLogRecPtr current_lsn, XLogRecPtr restart
|
||||
SpinLockRelease(&slot->mutex);
|
||||
|
||||
elog(DEBUG1, "got new restart lsn %X/%X at %X/%X",
|
||||
(uint32) (restart_lsn >> 32), (uint32) restart_lsn,
|
||||
(uint32) (current_lsn >> 32), (uint32) current_lsn);
|
||||
LSN_FORMAT_ARGS(restart_lsn),
|
||||
LSN_FORMAT_ARGS(current_lsn));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1638,14 +1633,11 @@ LogicalIncreaseRestartDecodingForSlot(XLogRecPtr current_lsn, XLogRecPtr restart
|
||||
SpinLockRelease(&slot->mutex);
|
||||
|
||||
elog(DEBUG1, "failed to increase restart lsn: proposed %X/%X, after %X/%X, current candidate %X/%X, current after %X/%X, flushed up to %X/%X",
|
||||
(uint32) (restart_lsn >> 32), (uint32) restart_lsn,
|
||||
(uint32) (current_lsn >> 32), (uint32) current_lsn,
|
||||
(uint32) (candidate_restart_lsn >> 32),
|
||||
(uint32) candidate_restart_lsn,
|
||||
(uint32) (candidate_restart_valid >> 32),
|
||||
(uint32) candidate_restart_valid,
|
||||
(uint32) (confirmed_flush >> 32),
|
||||
(uint32) confirmed_flush);
|
||||
LSN_FORMAT_ARGS(restart_lsn),
|
||||
LSN_FORMAT_ARGS(current_lsn),
|
||||
LSN_FORMAT_ARGS(candidate_restart_lsn),
|
||||
LSN_FORMAT_ARGS(candidate_restart_valid),
|
||||
LSN_FORMAT_ARGS(confirmed_flush));
|
||||
}
|
||||
|
||||
/* candidates are already valid with the current flush position, apply */
|
||||
|
@@ -789,8 +789,7 @@ StartupReplicationOrigin(void)
|
||||
ereport(LOG,
|
||||
(errmsg("recovered replication state of node %u to %X/%X",
|
||||
disk_state.roident,
|
||||
(uint32) (disk_state.remote_lsn >> 32),
|
||||
(uint32) disk_state.remote_lsn)));
|
||||
LSN_FORMAT_ARGS(disk_state.remote_lsn))));
|
||||
}
|
||||
|
||||
/* now check checksum */
|
||||
|
@@ -4366,8 +4366,7 @@ ReorderBufferSerializedPath(char *path, ReplicationSlot *slot, TransactionId xid
|
||||
|
||||
snprintf(path, MAXPGPATH, "pg_replslot/%s/xid-%u-lsn-%X-%X.spill",
|
||||
NameStr(MyReplicationSlot->data.name),
|
||||
xid,
|
||||
(uint32) (recptr >> 32), (uint32) recptr);
|
||||
xid, LSN_FORMAT_ARGS(recptr));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -801,7 +801,7 @@ SnapBuildDistributeNewCatalogSnapshot(SnapBuild *builder, XLogRecPtr lsn)
|
||||
continue;
|
||||
|
||||
elog(DEBUG2, "adding a new snapshot to %u at %X/%X",
|
||||
txn->xid, (uint32) (lsn >> 32), (uint32) lsn);
|
||||
txn->xid, LSN_FORMAT_ARGS(lsn));
|
||||
|
||||
/*
|
||||
* increase the snapshot's refcount for the transaction we are handing
|
||||
@@ -1191,7 +1191,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
{
|
||||
ereport(DEBUG1,
|
||||
(errmsg_internal("skipping snapshot at %X/%X while building logical decoding snapshot, xmin horizon too low",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
LSN_FORMAT_ARGS(lsn)),
|
||||
errdetail_internal("initial xmin horizon of %u vs the snapshot's %u",
|
||||
builder->initial_xmin_horizon, running->oldestRunningXid)));
|
||||
|
||||
@@ -1230,7 +1230,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found consistent point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
LSN_FORMAT_ARGS(lsn)),
|
||||
errdetail("There are no running transactions.")));
|
||||
|
||||
return false;
|
||||
@@ -1274,7 +1274,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found initial starting point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
LSN_FORMAT_ARGS(lsn)),
|
||||
errdetail("Waiting for transactions (approximately %d) older than %u to end.",
|
||||
running->xcnt, running->nextXid)));
|
||||
|
||||
@@ -1298,7 +1298,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found initial consistent point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
LSN_FORMAT_ARGS(lsn)),
|
||||
errdetail("Waiting for transactions (approximately %d) older than %u to end.",
|
||||
running->xcnt, running->nextXid)));
|
||||
|
||||
@@ -1323,7 +1323,7 @@ SnapBuildFindSnapshot(SnapBuild *builder, XLogRecPtr lsn, xl_running_xacts *runn
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found consistent point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
LSN_FORMAT_ARGS(lsn)),
|
||||
errdetail("There are no old transactions anymore.")));
|
||||
}
|
||||
|
||||
@@ -1477,7 +1477,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
|
||||
* no hope continuing to decode anyway.
|
||||
*/
|
||||
sprintf(path, "pg_logical/snapshots/%X-%X.snap",
|
||||
(uint32) (lsn >> 32), (uint32) lsn);
|
||||
LSN_FORMAT_ARGS(lsn));
|
||||
|
||||
/*
|
||||
* first check whether some other backend already has written the snapshot
|
||||
@@ -1520,7 +1520,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
|
||||
|
||||
/* to make sure only we will write to this tempfile, include pid */
|
||||
sprintf(tmppath, "pg_logical/snapshots/%X-%X.snap.%u.tmp",
|
||||
(uint32) (lsn >> 32), (uint32) lsn, MyProcPid);
|
||||
LSN_FORMAT_ARGS(lsn), MyProcPid);
|
||||
|
||||
/*
|
||||
* Unlink temporary file if it already exists, needs to have been before a
|
||||
@@ -1670,7 +1670,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
|
||||
return false;
|
||||
|
||||
sprintf(path, "pg_logical/snapshots/%X-%X.snap",
|
||||
(uint32) (lsn >> 32), (uint32) lsn);
|
||||
LSN_FORMAT_ARGS(lsn));
|
||||
|
||||
fd = OpenTransientFile(path, O_RDONLY | PG_BINARY);
|
||||
|
||||
@@ -1854,7 +1854,7 @@ SnapBuildRestore(SnapBuild *builder, XLogRecPtr lsn)
|
||||
|
||||
ereport(LOG,
|
||||
(errmsg("logical decoding found consistent point at %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn),
|
||||
LSN_FORMAT_ARGS(lsn)),
|
||||
errdetail("Logical decoding will begin using saved snapshot.")));
|
||||
return true;
|
||||
|
||||
|
@@ -1120,9 +1120,7 @@ copy_table_done:
|
||||
|
||||
elog(DEBUG1,
|
||||
"LogicalRepSyncTableStart: '%s' origin_startpos lsn %X/%X",
|
||||
originname,
|
||||
(uint32) (*origin_startpos >> 32),
|
||||
(uint32) *origin_startpos);
|
||||
originname, LSN_FORMAT_ARGS(*origin_startpos));
|
||||
|
||||
/*
|
||||
* We are done with the initial data synchronization, update the state.
|
||||
|
@@ -2359,10 +2359,9 @@ send_feedback(XLogRecPtr recvpos, bool force, bool requestReply)
|
||||
|
||||
elog(DEBUG2, "sending feedback (force %d) to recv %X/%X, write %X/%X, flush %X/%X",
|
||||
force,
|
||||
(uint32) (recvpos >> 32), (uint32) recvpos,
|
||||
(uint32) (writepos >> 32), (uint32) writepos,
|
||||
(uint32) (flushpos >> 32), (uint32) flushpos
|
||||
);
|
||||
LSN_FORMAT_ARGS(recvpos),
|
||||
LSN_FORMAT_ARGS(writepos),
|
||||
LSN_FORMAT_ARGS(flushpos));
|
||||
|
||||
walrcv_send(wrconn, reply_message->data, reply_message->len);
|
||||
|
||||
|
@@ -1242,8 +1242,7 @@ restart:
|
||||
ereport(LOG,
|
||||
(errmsg("invalidating slot \"%s\" because its restart_lsn %X/%X exceeds max_slot_wal_keep_size",
|
||||
NameStr(slotname),
|
||||
(uint32) (restart_lsn >> 32),
|
||||
(uint32) restart_lsn)));
|
||||
LSN_FORMAT_ARGS(restart_lsn))));
|
||||
|
||||
SpinLockAcquire(&s->mutex);
|
||||
s->data.invalidated_at = s->data.restart_lsn;
|
||||
|
@@ -659,8 +659,7 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("cannot advance replication slot to %X/%X, minimum is %X/%X",
|
||||
(uint32) (moveto >> 32), (uint32) moveto,
|
||||
(uint32) (minlsn >> 32), (uint32) minlsn)));
|
||||
LSN_FORMAT_ARGS(moveto), LSN_FORMAT_ARGS(minlsn))));
|
||||
|
||||
/* Do the actual slot update, depending on the slot type */
|
||||
if (OidIsValid(MyReplicationSlot->data.database))
|
||||
|
@@ -222,7 +222,7 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit)
|
||||
new_status = (char *) palloc(len + 32 + 1);
|
||||
memcpy(new_status, old_status, len);
|
||||
sprintf(new_status + len, " waiting for %X/%X",
|
||||
(uint32) (lsn >> 32), (uint32) lsn);
|
||||
LSN_FORMAT_ARGS(lsn));
|
||||
set_ps_display(new_status);
|
||||
new_status[len] = '\0'; /* truncate off " waiting ..." */
|
||||
}
|
||||
@@ -534,9 +534,9 @@ SyncRepReleaseWaiters(void)
|
||||
LWLockRelease(SyncRepLock);
|
||||
|
||||
elog(DEBUG3, "released %d procs up to write %X/%X, %d procs up to flush %X/%X, %d procs up to apply %X/%X",
|
||||
numwrite, (uint32) (writePtr >> 32), (uint32) writePtr,
|
||||
numflush, (uint32) (flushPtr >> 32), (uint32) flushPtr,
|
||||
numapply, (uint32) (applyPtr >> 32), (uint32) applyPtr);
|
||||
numwrite, LSN_FORMAT_ARGS(writePtr),
|
||||
numflush, LSN_FORMAT_ARGS(flushPtr),
|
||||
numapply, LSN_FORMAT_ARGS(applyPtr));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -392,13 +392,11 @@ WalReceiverMain(void)
|
||||
if (first_stream)
|
||||
ereport(LOG,
|
||||
(errmsg("started streaming WAL from primary at %X/%X on timeline %u",
|
||||
(uint32) (startpoint >> 32), (uint32) startpoint,
|
||||
startpointTLI)));
|
||||
LSN_FORMAT_ARGS(startpoint), startpointTLI)));
|
||||
else
|
||||
ereport(LOG,
|
||||
(errmsg("restarted WAL streaming at %X/%X on timeline %u",
|
||||
(uint32) (startpoint >> 32), (uint32) startpoint,
|
||||
startpointTLI)));
|
||||
LSN_FORMAT_ARGS(startpoint), startpointTLI)));
|
||||
first_stream = false;
|
||||
|
||||
/* Initialize LogstreamResult and buffers for processing messages */
|
||||
@@ -465,7 +463,7 @@ WalReceiverMain(void)
|
||||
(errmsg("replication terminated by primary server"),
|
||||
errdetail("End of WAL reached on timeline %u at %X/%X.",
|
||||
startpointTLI,
|
||||
(uint32) (LogstreamResult.Write >> 32), (uint32) LogstreamResult.Write)));
|
||||
LSN_FORMAT_ARGS(LogstreamResult.Write))));
|
||||
endofwal = true;
|
||||
break;
|
||||
}
|
||||
@@ -699,8 +697,7 @@ WalRcvWaitForStartPosition(XLogRecPtr *startpoint, TimeLineID *startpointTLI)
|
||||
char activitymsg[50];
|
||||
|
||||
snprintf(activitymsg, sizeof(activitymsg), "restarting at %X/%X",
|
||||
(uint32) (*startpoint >> 32),
|
||||
(uint32) *startpoint);
|
||||
LSN_FORMAT_ARGS(*startpoint));
|
||||
set_ps_display(activitymsg);
|
||||
}
|
||||
}
|
||||
@@ -1002,8 +999,7 @@ XLogWalRcvFlush(bool dying)
|
||||
char activitymsg[50];
|
||||
|
||||
snprintf(activitymsg, sizeof(activitymsg), "streaming %X/%X",
|
||||
(uint32) (LogstreamResult.Write >> 32),
|
||||
(uint32) LogstreamResult.Write);
|
||||
LSN_FORMAT_ARGS(LogstreamResult.Write));
|
||||
set_ps_display(activitymsg);
|
||||
}
|
||||
|
||||
@@ -1080,9 +1076,9 @@ XLogWalRcvSendReply(bool force, bool requestReply)
|
||||
|
||||
/* Send it */
|
||||
elog(DEBUG2, "sending write %X/%X flush %X/%X apply %X/%X%s",
|
||||
(uint32) (writePtr >> 32), (uint32) writePtr,
|
||||
(uint32) (flushPtr >> 32), (uint32) flushPtr,
|
||||
(uint32) (applyPtr >> 32), (uint32) applyPtr,
|
||||
LSN_FORMAT_ARGS(writePtr),
|
||||
LSN_FORMAT_ARGS(flushPtr),
|
||||
LSN_FORMAT_ARGS(applyPtr),
|
||||
requestReply ? " (reply requested)" : "");
|
||||
|
||||
walrcv_send(wrconn, reply_message.data, reply_message.len);
|
||||
|
@@ -402,7 +402,7 @@ IdentifySystem(void)
|
||||
else
|
||||
logptr = GetFlushRecPtr();
|
||||
|
||||
snprintf(xloc, sizeof(xloc), "%X/%X", (uint32) (logptr >> 32), (uint32) logptr);
|
||||
snprintf(xloc, sizeof(xloc), "%X/%X", LSN_FORMAT_ARGS(logptr));
|
||||
|
||||
if (MyDatabaseId != InvalidOid)
|
||||
{
|
||||
@@ -674,13 +674,11 @@ StartReplication(StartReplicationCmd *cmd)
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errmsg("requested starting point %X/%X on timeline %u is not in this server's history",
|
||||
(uint32) (cmd->startpoint >> 32),
|
||||
(uint32) (cmd->startpoint),
|
||||
LSN_FORMAT_ARGS(cmd->startpoint),
|
||||
cmd->timeline),
|
||||
errdetail("This server's history forked from timeline %u at %X/%X.",
|
||||
cmd->timeline,
|
||||
(uint32) (switchpoint >> 32),
|
||||
(uint32) (switchpoint))));
|
||||
LSN_FORMAT_ARGS(switchpoint))));
|
||||
}
|
||||
sendTimeLineValidUpto = switchpoint;
|
||||
}
|
||||
@@ -723,10 +721,8 @@ StartReplication(StartReplicationCmd *cmd)
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errmsg("requested starting point %X/%X is ahead of the WAL flush position of this server %X/%X",
|
||||
(uint32) (cmd->startpoint >> 32),
|
||||
(uint32) (cmd->startpoint),
|
||||
(uint32) (FlushPtr >> 32),
|
||||
(uint32) (FlushPtr))));
|
||||
LSN_FORMAT_ARGS(cmd->startpoint),
|
||||
LSN_FORMAT_ARGS(FlushPtr))));
|
||||
}
|
||||
|
||||
/* Start streaming from the requested point */
|
||||
@@ -769,8 +765,7 @@ StartReplication(StartReplicationCmd *cmd)
|
||||
bool nulls[2];
|
||||
|
||||
snprintf(startpos_str, sizeof(startpos_str), "%X/%X",
|
||||
(uint32) (sendTimeLineValidUpto >> 32),
|
||||
(uint32) sendTimeLineValidUpto);
|
||||
LSN_FORMAT_ARGS(sendTimeLineValidUpto));
|
||||
|
||||
dest = CreateDestReceiver(DestRemoteSimple);
|
||||
MemSet(nulls, false, sizeof(nulls));
|
||||
@@ -1063,8 +1058,7 @@ CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
|
||||
}
|
||||
|
||||
snprintf(xloc, sizeof(xloc), "%X/%X",
|
||||
(uint32) (MyReplicationSlot->data.confirmed_flush >> 32),
|
||||
(uint32) MyReplicationSlot->data.confirmed_flush);
|
||||
LSN_FORMAT_ARGS(MyReplicationSlot->data.confirmed_flush));
|
||||
|
||||
dest = CreateDestReceiver(DestRemoteSimple);
|
||||
MemSet(nulls, false, sizeof(nulls));
|
||||
@@ -1900,9 +1894,9 @@ ProcessStandbyReplyMessage(void)
|
||||
replyTimeStr = pstrdup(timestamptz_to_str(replyTime));
|
||||
|
||||
elog(DEBUG2, "write %X/%X flush %X/%X apply %X/%X%s reply_time %s",
|
||||
(uint32) (writePtr >> 32), (uint32) writePtr,
|
||||
(uint32) (flushPtr >> 32), (uint32) flushPtr,
|
||||
(uint32) (applyPtr >> 32), (uint32) applyPtr,
|
||||
LSN_FORMAT_ARGS(writePtr),
|
||||
LSN_FORMAT_ARGS(flushPtr),
|
||||
LSN_FORMAT_ARGS(applyPtr),
|
||||
replyRequested ? " (reply requested)" : "",
|
||||
replyTimeStr);
|
||||
|
||||
@@ -2694,8 +2688,8 @@ XLogSendPhysical(void)
|
||||
WalSndCaughtUp = true;
|
||||
|
||||
elog(DEBUG1, "walsender reached end of timeline at %X/%X (sent up to %X/%X)",
|
||||
(uint32) (sendTimeLineValidUpto >> 32), (uint32) sendTimeLineValidUpto,
|
||||
(uint32) (sentPtr >> 32), (uint32) sentPtr);
|
||||
LSN_FORMAT_ARGS(sendTimeLineValidUpto),
|
||||
LSN_FORMAT_ARGS(sentPtr));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2826,7 +2820,7 @@ retry:
|
||||
char activitymsg[50];
|
||||
|
||||
snprintf(activitymsg, sizeof(activitymsg), "streaming %X/%X",
|
||||
(uint32) (sentPtr >> 32), (uint32) sentPtr);
|
||||
LSN_FORMAT_ARGS(sentPtr));
|
||||
set_ps_display(activitymsg);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user