There is no real reason to just run multiple words together when
we can instead punctuate them with marks intended for that purpose.
Per suggestion from Álvaro Herrera.
Discussion: http://postgr.es/m/
202311161021.nisg7imt7kyf@alvherre.pgsql
*
* Caller should set up the parsing context and then invoke this function.
* For each file whose information is extracted from the manifest,
- * context->perfile_cb is invoked. In case of trouble, context->error_cb is
+ * context->per_file_cb is invoked. In case of trouble, context->error_cb is
* invoked and is expected not to return.
*/
void
}
/* Invoke the callback with the details we've gathered. */
- context->perfile_cb(context, parse->pathname, size,
- checksum_type, checksum_length, checksum_payload);
+ context->per_file_cb(context, parse->pathname, size,
+ checksum_type, checksum_length, checksum_payload);
/* Free memory we no longer need. */
if (parse->size != NULL)
"could not parse end LSN");
/* Invoke the callback with the details we've gathered. */
- context->perwalrange_cb(context, tli, start_lsn, end_lsn);
+ context->per_wal_range_cb(context, tli, start_lsn, end_lsn);
/* Free memory we no longer need. */
if (parse->timeline != NULL)
struct JsonManifestParseContext;
typedef struct JsonManifestParseContext JsonManifestParseContext;
-typedef void (*json_manifest_perfile_callback) (JsonManifestParseContext *,
- char *pathname,
- size_t size, pg_checksum_type checksum_type,
- int checksum_length, uint8 *checksum_payload);
-typedef void (*json_manifest_perwalrange_callback) (JsonManifestParseContext *,
- TimeLineID tli,
- XLogRecPtr start_lsn, XLogRecPtr end_lsn);
+typedef void (*json_manifest_per_file_callback) (JsonManifestParseContext *,
+ char *pathname,
+ size_t size, pg_checksum_type checksum_type,
+ int checksum_length, uint8 *checksum_payload);
+typedef void (*json_manifest_per_wal_range_callback) (JsonManifestParseContext *,
+ TimeLineID tli,
+ XLogRecPtr start_lsn, XLogRecPtr end_lsn);
typedef void (*json_manifest_error_callback) (JsonManifestParseContext *,
const char *fmt,...) pg_attribute_printf(2, 3)
pg_attribute_noreturn();
struct JsonManifestParseContext
{
void *private_data;
- json_manifest_perfile_callback perfile_cb;
- json_manifest_perwalrange_callback perwalrange_cb;
+ json_manifest_per_file_callback per_file_cb;
+ json_manifest_per_wal_range_callback per_wal_range_cb;
json_manifest_error_callback error_cb;
};
private_context.first_wal_range = NULL;
private_context.last_wal_range = NULL;
context.private_data = &private_context;
- context.perfile_cb = record_manifest_details_for_file;
- context.perwalrange_cb = record_manifest_details_for_wal_range;
+ context.per_file_cb = record_manifest_details_for_file;
+ context.per_wal_range_cb = record_manifest_details_for_wal_range;
context.error_cb = report_manifest_error;
json_parse_manifest(&context, buffer, statbuf.st_size);
join_search_hook_type
json_aelem_action
json_manifest_error_callback
-json_manifest_perfile_callback
-json_manifest_perwalrange_callback
+json_manifest_per_file_callback
+json_manifest_per_wal_range_callback
json_ofield_action
json_scalar_action
json_struct_action