Update/correct comments in controldata code

This commit is contained in:
Ian Barwick
2018-11-14 09:52:52 +09:00
parent 3b10750a7f
commit 7d99b96717
2 changed files with 11 additions and 8 deletions

View File

@@ -1,5 +1,11 @@
/* /*
* controldata.c * controldata.c - functions for reading the pg_control file
*
* The functions provided here enable repmgr to read a pg_control file
* in a version-indepent way, even if the PostgreSQL instance is not
* running. For that reason we can't use on the pg_control_*() functions
* provided in PostgreSQL 9.6 and later.
*
* Copyright (c) 2ndQuadrant, 2010-2018 * Copyright (c) 2ndQuadrant, 2010-2018
* *
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
@@ -112,6 +118,7 @@ describe_db_state(DBState state)
case DB_IN_PRODUCTION: case DB_IN_PRODUCTION:
return _("in production"); return _("in production");
} }
return _("unrecognized status code"); return _("unrecognized status code");
} }
@@ -265,9 +272,7 @@ get_controlfile(const char *DataDir)
/* /*
* We don't check the CRC here as we're potentially checking a pg_control * We don't check the CRC here as we're potentially checking a pg_control
* file from a different PostgreSQL version to the one repmgr was compiled * file from a different PostgreSQL version to the one repmgr was compiled
* against. However we're only interested in the first few fields, which * against.
* should be constant across supported versions
*
*/ */
return control_file_info; return control_file_info;

View File

@@ -134,13 +134,11 @@ typedef struct ControlFileData93
/* /*
* Following fields added since 9.3: * Following field added since 9.3:
* *
* int max_worker_processes; * int max_worker_processes;
* int max_prepared_xacts;
* int max_locks_per_xact;
*
*/ */
typedef struct ControlFileData94 typedef struct ControlFileData94
{ {
uint64 system_identifier; uint64 system_identifier;