Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94965 - Postgresql: pg-hier use flag requires initdb, you can't use an old data dir, just like a 7.4 -> 8.0 upgrade
Summary: Postgresql: pg-hier use flag requires initdb, you can't use an old data dir, ...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: PgSQL Bugs
URL: http://gppl.moonbone.ru/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-03 17:32 UTC by Russell Smith
Modified: 2007-09-22 23:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Russell Smith 2005-06-03 17:32:51 UTC
The pg-heir homepage says the following;
REQUIRED!! After installing patched Pg it is required to run 'initdb'. Without
this Pg will fail with error ERROR: did not find '}' at end of input node.

This happens when a user compiles with or without pg-hier and swap.  The ebuild
does not complain the versions are incompatible.  Which they are.

Applying the pg-hier should have the same effect as attempting to upgrade from
7.4 -> 8.0  It should tell you that you need to dump your db first, and
uninstall.  This means PG_VERSION that is used to test in the ebuild may need
some way to find if the pg-hier is applied or not.

Reproducible: Always
Steps to Reproduce:
emerge -v postgresql
ebuild /var/db/pkg/dev-db/postgresql/postgresql-8.0.2-r1.ebuild config
<Enter data, in pg. Not sure how much>
USE="pg-hier" emerge -v postgresql
pg_dumpall -U postgresql

Actual Results:  
ERROR: did not find '}' at end of input node.

Expected Results:  
Should not be able to run the 
USE="pg-hier" emerge -v postgresql
step, it should complain about incompatible versions of pg.
Comment 1 Alvaro Herrera 2005-06-03 18:19:21 UTC
This comment written by Alvaro Herrera, <alvherre@dcc.uchile.cl>:

One way to make the installation automatically detect the incompatibility
between the two versions, is have the pg-hier patch modify the
src/include/catalog/catversion.h file, to change the CATALOG_VERSION_NO
#definition.  This symbol is what is used to force initdb's across major
versions of the mainline PostgreSQL.

7.4 ships with CATALOG_VERSION_NO 200310211, and all 7.4 releases are guaranteed
to have the same definition; however I think it would be unwise to just
increment the number by one, because "you never know."  This would work:

Index: catversion.h
===================================================================
RCS file: /home/alvherre/cvs/pgsql/src/include/catalog/catversion.h,v
retrieving revision 1.210
diff -u -r1.210 catversion.h
--- catversion.h        21 Oct 2003 16:23:16 -0000      1.210
+++ catversion.h        4 Jun 2005 01:16:16 -0000
@@ -53,6 +53,6 @@
  */
 
 /*                                                     yyyymmddN */
-#define CATALOG_VERSION_NO     200310211
+#define CATALOG_VERSION_NO     200310210
 
 #endif
Comment 2 Luca Longinotti (RETIRED) gentoo-dev 2006-09-30 08:34:24 UTC
The pg-hier patch will be soon dropped with the new PostgreSQL packages we're preparing, as it's dead and abandoned upstream, and only compatible with older PostgreSQL versions.
Thus, closing this!
Best regards, CHTEKK.