Skip to content

Commit 278eb13

Browse files
committed
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
1 parent d463aa0 commit 278eb13

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/bin/pg_verifybackup/pg_verifybackup.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ static void parse_manifest_file(char *manifest_path,
119119
manifest_files_hash **ht_p,
120120
manifest_wal_range **first_wal_range_p);
121121

122-
static void record_manifest_details_for_file(JsonManifestParseContext *context,
123-
char *pathname, size_t size,
124-
pg_checksum_type checksum_type,
125-
int checksum_length,
126-
uint8 *checksum_payload);
127-
static void record_manifest_details_for_wal_range(JsonManifestParseContext *context,
128-
TimeLineID tli,
129-
XLogRecPtr start_lsn,
130-
XLogRecPtr end_lsn);
122+
static void verifybackup_per_file_cb(JsonManifestParseContext *context,
123+
char *pathname, size_t size,
124+
pg_checksum_type checksum_type,
125+
int checksum_length,
126+
uint8 *checksum_payload);
127+
static void verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
128+
TimeLineID tli,
129+
XLogRecPtr start_lsn,
130+
XLogRecPtr end_lsn);
131131
static void report_manifest_error(JsonManifestParseContext *context,
132132
const char *fmt,...)
133133
pg_attribute_printf(2, 3) pg_attribute_noreturn();
@@ -440,8 +440,8 @@ parse_manifest_file(char *manifest_path, manifest_files_hash **ht_p,
440440
private_context.first_wal_range = NULL;
441441
private_context.last_wal_range = NULL;
442442
context.private_data = &private_context;
443-
context.per_file_cb = record_manifest_details_for_file;
444-
context.per_wal_range_cb = record_manifest_details_for_wal_range;
443+
context.per_file_cb = verifybackup_per_file_cb;
444+
context.per_wal_range_cb = verifybackup_per_wal_range_cb;
445445
context.error_cb = report_manifest_error;
446446
json_parse_manifest(&context, buffer, statbuf.st_size);
447447

@@ -475,10 +475,10 @@ report_manifest_error(JsonManifestParseContext *context, const char *fmt,...)
475475
* Record details extracted from the backup manifest for one file.
476476
*/
477477
static void
478-
record_manifest_details_for_file(JsonManifestParseContext *context,
479-
char *pathname, size_t size,
480-
pg_checksum_type checksum_type,
481-
int checksum_length, uint8 *checksum_payload)
478+
verifybackup_per_file_cb(JsonManifestParseContext *context,
479+
char *pathname, size_t size,
480+
pg_checksum_type checksum_type,
481+
int checksum_length, uint8 *checksum_payload)
482482
{
483483
parser_context *pcxt = context->private_data;
484484
manifest_files_hash *ht = pcxt->ht;
@@ -504,9 +504,9 @@ record_manifest_details_for_file(JsonManifestParseContext *context,
504504
* Record details extracted from the backup manifest for one WAL range.
505505
*/
506506
static void
507-
record_manifest_details_for_wal_range(JsonManifestParseContext *context,
508-
TimeLineID tli,
509-
XLogRecPtr start_lsn, XLogRecPtr end_lsn)
507+
verifybackup_per_wal_range_cb(JsonManifestParseContext *context,
508+
TimeLineID tli,
509+
XLogRecPtr start_lsn, XLogRecPtr end_lsn)
510510
{
511511
parser_context *pcxt = context->private_data;
512512
manifest_wal_range *range;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy