mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
pg_upgrade: preserve the timestamp epoch
This is useful for replication tools like Slony and Skytools. This is a
backpatch of a74a4aa23b
.
Report by Sergey Konoplev
Backpatch through 9.3
This commit is contained in:
@ -234,16 +234,20 @@ get_control_data(ClusterInfo *cluster, bool live_check)
|
||||
}
|
||||
else if ((p = strstr(bufin, "Latest checkpoint's NextXID:")) != NULL)
|
||||
{
|
||||
char *op = strchr(p, '/');
|
||||
p = strchr(p, ':');
|
||||
|
||||
if (op == NULL)
|
||||
op = strchr(p, ':');
|
||||
|
||||
if (op == NULL || strlen(op) <= 1)
|
||||
if (p == NULL || strlen(p) <= 1)
|
||||
pg_log(PG_FATAL, "%d: controldata retrieval problem\n", __LINE__);
|
||||
|
||||
op++; /* removing ':' char */
|
||||
cluster->controldata.chkpnt_nxtxid = str2uint(op);
|
||||
p++; /* removing ':' char */
|
||||
cluster->controldata.chkpnt_nxtepoch = str2uint(p);
|
||||
|
||||
p = strchr(p, '/');
|
||||
if (p == NULL || strlen(p) <= 1)
|
||||
pg_log(PG_FATAL, "%d: controldata retrieval problem\n", __LINE__);
|
||||
|
||||
p++; /* removing '/' char */
|
||||
cluster->controldata.chkpnt_nxtxid = str2uint(p);
|
||||
got_xid = true;
|
||||
}
|
||||
else if ((p = strstr(bufin, "Latest checkpoint's NextOID:")) != NULL)
|
||||
|
Reference in New Issue
Block a user