Changes in repmgr are:

- Add checks to test if the directories are useful for us (basically
  the checks follow the same approach as initdb does)
- Add connection parameters
- Better use of rsync
- Some more clean up of code

Changes in repmgrd are:
- Add a parameter to allow the user specify an repmgr.conf
- Change the name of the repl_status table for repl_monitor
- Create a repl_status view that also shows lag in time
- Some more clean up of code
This commit is contained in:
Jaime Casanova
2010-09-28 17:23:15 -05:00
parent 44a3548c2e
commit ae628d0527
8 changed files with 399 additions and 106 deletions

View File

@@ -2,9 +2,7 @@
* dbutils.c
* Copyright (c) 2ndQuadrant, 2010
*
* Database connections/managements functions
* XXX At least i can create another function here to avoid code duplication
* on the main file
* Database connection/management functions
*
*/
@@ -69,6 +67,8 @@ is_supported_version(PGconn *conn)
{
fprintf(stderr, "PQexec failed: %s", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
exit(1);
}
major_version = atoi(PQgetvalue(res, 0, 0));
PQclear(res);
@@ -92,6 +92,8 @@ guc_setted(PGconn *conn, const char *parameter, const char *op, const char *valu
{
fprintf(stderr, "PQexec failed: %s", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
exit(1);
}
if (PQgetisnull(res, 0, 0))
{
@@ -124,6 +126,8 @@ get_cluster_size(PGconn *conn)
{
fprintf(stderr, "PQexec failed: %s", PQerrorMessage(conn));
PQclear(res);
PQfinish(conn);
exit(1);
}
strcpy(size, PQgetvalue(res, 0, 0))
PQclear(res);