]> granicus.if.org Git - postgresql/commitdiff
pg_upgrade: Add C comment about NextXID delimiter
authorBruce Momjian <bruce@momjian.us>
Fri, 12 Feb 2016 22:53:36 +0000 (17:53 -0500)
committerBruce Momjian <bruce@momjian.us>
Fri, 12 Feb 2016 22:53:36 +0000 (17:53 -0500)
We don't test the catversion for the NextXID delimiter change, we just
test the string contents;  explain why.

Reported-by: Michael Paquier
src/bin/pg_upgrade/controldata.c

index 34e194cb8bbf090a349f2f198f5d70255f920527..2601827b92d17d9d345ae1270a1a2e4aeb922102 100644 (file)
@@ -197,9 +197,14 @@ get_control_data(ClusterInfo *cluster, bool live_check)
                        p++;                            /* remove ':' char */
                        cluster->controldata.chkpnt_nxtepoch = str2uint(p);
 
+                       /*
+                        * Delimiter changed from '/' to ':' in 9.6.  We don't test for
+                        * the catalog version of the change because the catalog version
+                        * is pulled from pg_controldata too, and it isn't worth adding
+                        * an order dependency for this --- we just check the string.
+                        */
                        if (strchr(p, '/') != NULL)
                                p = strchr(p, '/');
-                       /* delimiter changed from '/' to ':' in 9.6 */
                        else if (GET_MAJOR_VERSION(cluster->major_version) >= 906)
                                p = strchr(p, ':');
                        else