The emerge required that the databases be pg_dump'ed and the /var/lib/postgesql/ directory be removed before it would upgrade to 7.4.2-r1. After this was done the emerge completed normally but postgresql would not start. Errors: 1) No /var/lib/postgresql/data directory. This was created. 2) /var/lib/postgresql/data with wrong permissions. 0700 required. This was changed. 3) FATAL: "/var/lib/postgresql/data" is not a valid data directory DETAIL: File "/var/lib/postgresql/data/PG_VERSION" is missing. qpkg -l shows that PG_VERSION is not included in the install at all. Reproducible: Always Steps to Reproduce: 1. 2. 3. Portage 2.0.50-r6 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.2-r9, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 x86_64 5 Gentoo Base System version 1.4.10 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CFLAGS="-O2 -fPIC" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -fPIC" DISTDIR="/opt/no_archive/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache sandbox" GENTOO_MIRRORS="http://128.213.5.34/gentoo/" MAKEOPTS="-j2" PKGDIR="/opt/no_archive/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X alsa amd64 apm arts avi berkdb cdr crypt doc encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde ldap libg++ libwww log4cpp mikmod motif mozilla mpeg mysql nas ncurses nls nogcj oggvorbis opengl oss pam pdflib perl plotutils png postgres python qt quicktime readline ruby sdl slang spell ssl svg tcltk tcpd tetex truetype usb wxwindows xinerama xml2 xmms xv zlib"
My mistake. Forgot that initdb is required to initialize the directories. It would be useful if a reminder was added to the message about doing pg_dump and removing the /var/lib/postgresql directories that initdb should be issued before doing a pg_restore.
(In reply to comment #1) > My mistake. Forgot that initdb is required to initialize the directories. It >would be useful if a reminder was added to the message about doing pg_dump and >removing the /var/lib/postgresql directories that initdb should be issued before >doing a pg_restore. There are postinstall instructions in current ebuilds, closing this bug. Sorry there has been no response.