timeline is not needed in BaseBackup()
authorMagnus Hagander <magnus@hagander.net>
Wed, 27 Apr 2011 18:39:20 +0000 (20:39 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 27 Apr 2011 18:39:20 +0000 (20:39 +0200)
This code was accidentally part of the patch, it's only
needed for the code that's for 9.2. Not needing the timeline
also removes the need to call IDENTIFY_SYSTEM.

Noted by Peter E.

src/bin/pg_basebackup/pg_basebackup.c

index aeec8136c4a02dbfaf8ccf8abb3007ac487df096..a5d9c2e6520f9f3d81119d05917ef5d072e942a4 100644 (file)
@@ -756,7 +756,6 @@ static void
 BaseBackup(void)
 {
        PGresult   *res;
-       uint32          timeline;
        char            current_path[MAXPGPATH];
        char            escaped_label[MAXPGPATH];
        int                     i;
@@ -768,25 +767,6 @@ BaseBackup(void)
         */
        conn = GetConnection();
 
-       /*
-        * Run IDENFITY_SYSTEM so we can get the timeline
-        */
-       res = PQexec(conn, "IDENTIFY_SYSTEM");
-       if (PQresultStatus(res) != PGRES_TUPLES_OK)
-       {
-               fprintf(stderr, _("%s: could not identify system: %s\n"),
-                               progname, PQerrorMessage(conn));
-               disconnect_and_exit(1);
-       }
-       if (PQntuples(res) != 1)
-       {
-               fprintf(stderr, _("%s: could not identify system, got %i rows\n"),
-                               progname, PQntuples(res));
-               disconnect_and_exit(1);
-       }
-       timeline = atoi(PQgetvalue(res, 0, 1));
-       PQclear(res);
-
        /*
         * Start the actual backup
         */