aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2023-12-05 12:51:39 -0500
committerRobert Haas <rhaas@postgresql.org>2023-12-05 12:51:39 -0500
commit278eb13c48236c261ed4bab1cb4696321e346eb7 (patch)
tree1a80830b377a9d478761408a3af0c5142df3b040 /src
parentd463aa06a9a8c078c1a80ac14b65765b9e5b9ecd (diff)
downloadpostgresql-278eb13c48236c261ed4bab1cb4696321e346eb7.tar.gz
postgresql-278eb13c48236c261ed4bab1cb4696321e346eb7.zip
Rename pg_verifybackup's JsonManifestParseContext callback functions.
The old names were too generic, and would have applied to any binary that made use of JsonManifestParseContext. Rename to make the names specific to pg_verifybackup, since there are plans afoot to reuse this infrastructure. Per suggestion from Álvaro Herrra. Discussion: http://postgr.es/m/202311131625.o7hzq3oukuyd@alvherre.pgsql
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_verifybackup/pg_verifybackup.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/bin/pg_verifybackup/pg_verifybackup.c b/src/bin/pg_verifybackup/pg_verifybackup.c
index 8526eb9bbf7..d921d0f003a 100644
--- a/src/bin/pg_verifybackup/pg_verifybackup.c
+++ b/src/bin/pg_verifybackup/pg_verifybackup.c
@@ -119,15 +119,15 @@ static void parse_manifest_file(char *manifest_path,
manifest_files_hash **ht_p,
manifest_wal_range **first_wal_range_p);
-static void record_manifest_details_for_file(JsonManifestParseContext *context,
- char *pathname, size_t size,
- pg_checksum_type checksum_type,
- int checksum_length,
- uint8 *checksum_payload);
-static void record_manifest_details_for_wal_range(JsonManifestParseContext *context,
- TimeLineID tli,
- XLogRecPtr start_lsn,
- XLogRecPtr end_lsn);
+static void verifybackup_per_file_cb(JsonManifestParseContext *context,
+ char *pathname, size_t size,
+ pg_checksum_type checksum_type,
+ int checksum_length,
+ uint8 *checksum_payload);
+static void verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
+ TimeLineID tli,
+ XLogRecPtr start_lsn,
+ XLogRecPtr end_lsn);
static void report_manifest_error(JsonManifestParseContext *context,
const char *fmt,...)
pg_attribute_printf(2, 3) pg_attribute_noreturn();
@@ -440,8 +440,8 @@ parse_manifest_file(char *manifest_path, manifest_files_hash **ht_p,
private_context.first_wal_range = NULL;
private_context.last_wal_range = NULL;
context.private_data = &private_context;
- context.per_file_cb = record_manifest_details_for_file;
- context.per_wal_range_cb = record_manifest_details_for_wal_range;
+ context.per_file_cb = verifybackup_per_file_cb;
+ context.per_wal_range_cb = verifybackup_per_wal_range_cb;
context.error_cb = report_manifest_error;
json_parse_manifest(&context, buffer, statbuf.st_size);
@@ -475,10 +475,10 @@ report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
* Record details extracted from the backup manifest for one file.
*/
static void
-record_manifest_details_for_file(JsonManifestParseContext *context,
- char *pathname, size_t size,
- pg_checksum_type checksum_type,
- int checksum_length, uint8 *checksum_payload)
+verifybackup_per_file_cb(JsonManifestParseContext *context,
+ char *pathname, size_t size,
+ pg_checksum_type checksum_type,
+ int checksum_length, uint8 *checksum_payload)
{
parser_context *pcxt = context->private_data;
manifest_files_hash *ht = pcxt->ht;
@@ -504,9 +504,9 @@ record_manifest_details_for_file(JsonManifestParseContext *context,
* Record details extracted from the backup manifest for one WAL range.
*/
static void
-record_manifest_details_for_wal_range(JsonManifestParseContext *context,
- TimeLineID tli,
- XLogRecPtr start_lsn, XLogRecPtr end_lsn)
+verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
+ TimeLineID tli,
+ XLogRecPtr start_lsn, XLogRecPtr end_lsn)
{
parser_context *pcxt = context->private_data;
manifest_wal_range *range;