Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 85919

Summary: Upgrading postgresql erased my databases
Product: [Retired] Red Hat Linux Reporter: Glen <glen>
Component: postgresqlAssignee: Andrew Overholt <overholt>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-12 22:10:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Glen 2003-03-10 20:57:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830

Description of problem:
I'm not sure whether this counts as a bug or if it's just foolishness on my
part.  Anyway I upgraded my postgresql packages on two of my machines using an
'rpm -Fvh *'.  After that the databases on one of the machines seems to have
dissapeared.  The second machine seems fine though.  Both machines had roughly
the exact same postgresql setup so it makes no sense how one is trashed while
the other one isn't.

On the machine the databases disappeared from, if I try and run 'psql template1'
it tells me this:
psql: FATAL 1:  Database "template1" does not exist.
        The database subdirectory '/var/lib/pgsql/data/base/1' is missing.

The way I understand it the template1 database should always be there no matter
what.  And in fact the whole /var/lib/pgsql/data/base directory is missing, not
just a directory under it.

Anyway, like I said, I'm not sure if this counts as a bug or what, but that's
what happened.

Version-Release number of selected component (if applicable):


How reproducible:
Didn't try


Additional info:

Comment 1 Andrew Overholt 2003-03-12 20:54:04 UTC
Hmm.  Can you tell me what packages you upgraded (ie. which ones, specifically)?
 Also, is it possible that your data directory was something other than
/var/lib/pgsql with your previous setup and the init script got overwritten? 
From what version(s) were you upgrading?  And to what?

Comment 2 Glen 2003-03-12 21:50:28 UTC
Darn it, I'm sorry to bother you guys.  It turns out that prior to the upgrade
my /var/lib/pgsql directory was actually a link to another location.  I still
find it rather odd though that after the upgrade there was no template1 database.

Comment 3 Andrew Overholt 2003-03-12 22:10:49 UTC
The database location is not initialized until running `/etc/init.d/postgresql
start` (or `service postgresql start`), so unless this was done after the
upgrade (with the link removed), it would not have been created.