summaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/worker.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-02-23 15:57:08 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-02-23 15:57:08 -0500
commitc29aff959dc64f7321062e7f33d8c6ec23db53d3 (patch)
tree4c3efa167e01805b2e4fcd6eead2e1a320a2c420 /src/backend/replication/logical/worker.c
parentb9d092c962ea3262930e3c31a8c3d79b66ce9d43 (diff)
Consistently declare timestamp variables as TimestampTz.
Twiddle the replication-related code so that its timestamp variables are declared TimestampTz, rather than the uninformative "int64" that was previously used for meant-to-be-always-integer timestamps. This resolves the int64-vs-TimestampTz declaration inconsistencies introduced by commit 7c030783a, though in the opposite direction to what was originally suggested. This required including datatype/timestamp.h in a couple more places than before. I decided it would be a good idea to slim down that header by not having it pull in <float.h> etc, as those headers are no longer at all relevant to its purpose. Unsurprisingly, a small number of .c files turn out to have been depending on those inclusions, so add them back in the .c files as needed. Discussion: https://postgr.es/m/26788.1487455319@sss.pgh.pa.us Discussion: https://postgr.es/m/27694.1487456324@sss.pgh.pa.us
Diffstat (limited to 'src/backend/replication/logical/worker.c')
-rw-r--r--src/backend/replication/logical/worker.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 563886b7b50..f73bdcd673f 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -981,12 +981,11 @@ ApplyLoop(void)
{
XLogRecPtr start_lsn;
XLogRecPtr end_lsn;
- TimestampTz send_time;
+ TimestampTz send_time;
start_lsn = pq_getmsgint64(&s);
end_lsn = pq_getmsgint64(&s);
- send_time =
- IntegerTimestampToTimestampTz(pq_getmsgint64(&s));
+ send_time = pq_getmsgint64(&s);
if (last_received < start_lsn)
last_received = start_lsn;
@@ -1000,13 +999,12 @@ ApplyLoop(void)
}
else if (c == 'k')
{
- XLogRecPtr endpos;
- TimestampTz timestamp;
- bool reply_requested;
+ XLogRecPtr endpos;
+ TimestampTz timestamp;
+ bool reply_requested;
endpos = pq_getmsgint64(&s);
- timestamp =
- IntegerTimestampToTimestampTz(pq_getmsgint64(&s));
+ timestamp = pq_getmsgint64(&s);
reply_requested = pq_getmsgbyte(&s);
send_feedback(endpos, reply_requested, false);