diff options
Diffstat (limited to 'src/backend/backup/basebackup_copy.c')
-rw-r--r-- | src/backend/backup/basebackup_copy.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/backup/basebackup_copy.c b/src/backend/backup/basebackup_copy.c index 1db80cde1b2..fee30c21e10 100644 --- a/src/backend/backup/basebackup_copy.c +++ b/src/backend/backup/basebackup_copy.c @@ -152,7 +152,7 @@ bbsink_copystream_begin_backup(bbsink *sink) SendTablespaceList(state->tablespaces); /* Send a CommandComplete message */ - pq_puttextmessage('C', "SELECT"); + pq_puttextmessage(PqMsg_CommandComplete, "SELECT"); /* Begin COPY stream. This will be used for all archives + manifest. */ SendCopyOutResponse(); @@ -169,7 +169,7 @@ bbsink_copystream_begin_archive(bbsink *sink, const char *archive_name) StringInfoData buf; ti = list_nth(state->tablespaces, state->tablespace_num); - pq_beginmessage(&buf, 'd'); /* CopyData */ + pq_beginmessage(&buf, PqMsg_CopyData); pq_sendbyte(&buf, 'n'); /* New archive */ pq_sendstring(&buf, archive_name); pq_sendstring(&buf, ti->path == NULL ? "" : ti->path); @@ -220,7 +220,7 @@ bbsink_copystream_archive_contents(bbsink *sink, size_t len) { mysink->last_progress_report_time = now; - pq_beginmessage(&buf, 'd'); /* CopyData */ + pq_beginmessage(&buf, PqMsg_CopyData); pq_sendbyte(&buf, 'p'); /* Progress report */ pq_sendint64(&buf, state->bytes_done); pq_endmessage(&buf); @@ -246,7 +246,7 @@ bbsink_copystream_end_archive(bbsink *sink) mysink->bytes_done_at_last_time_check = state->bytes_done; mysink->last_progress_report_time = GetCurrentTimestamp(); - pq_beginmessage(&buf, 'd'); /* CopyData */ + pq_beginmessage(&buf, PqMsg_CopyData); pq_sendbyte(&buf, 'p'); /* Progress report */ pq_sendint64(&buf, state->bytes_done); pq_endmessage(&buf); @@ -261,7 +261,7 @@ bbsink_copystream_begin_manifest(bbsink *sink) { StringInfoData buf; - pq_beginmessage(&buf, 'd'); /* CopyData */ + pq_beginmessage(&buf, PqMsg_CopyData); pq_sendbyte(&buf, 'm'); /* Manifest */ pq_endmessage(&buf); } @@ -318,7 +318,7 @@ SendCopyOutResponse(void) { StringInfoData buf; - pq_beginmessage(&buf, 'H'); + pq_beginmessage(&buf, PqMsg_CopyOutResponse); pq_sendbyte(&buf, 0); /* overall format */ pq_sendint16(&buf, 0); /* natts */ pq_endmessage(&buf); @@ -330,7 +330,7 @@ SendCopyOutResponse(void) static void SendCopyDone(void) { - pq_putemptymessage('c'); + pq_putemptymessage(PqMsg_CopyDone); } /* @@ -368,7 +368,7 @@ SendXlogRecPtrResult(XLogRecPtr ptr, TimeLineID tli) end_tup_output(tstate); /* Send a CommandComplete message */ - pq_puttextmessage('C', "SELECT"); + pq_puttextmessage(PqMsg_CommandComplete, "SELECT"); } /* |