pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: selkovjr@mcs.anl.gov
To: will@lashell.net
Cc: pgsql-admin@postgresql.org
Subject: Re: developer deleted a database directory, postgres won't start
Date: Wed, 29 Nov 2000 03:38:27 -0600
Message-ID: <200011290938.DAA18551@selkovjr.xnet.com> (raw)
In-Reply-To: <20001128185133.A10709@lyrical.dpnd.com>
References: <20001128185133.A10709@lyrical.dpnd.com>

> One of the developers deleted a directory from postgress's data
> directory. (He mistakenly believed this was "just like mysql" where 
> he could drop the database like that)
> 
> At any rate, now postgres just dies when it's attempting to 
> start, how can I fix this? 

I am not 100% sure whether that was a database or a table, but it
helped me once to set up a decoy. I just copied a similar file (or
a directory -- I am sorry, it's been too long ago). I could then start
the postmaster and later fix the problem by deleting the orphaned
records from the system catalogs. 

That was when the schema still had some resemblance of the one
inherited from Berkeley
(http://www.postgresql.org/devel-corner/docs/programmer/system-catalogs.htm
-- this one is now four or more years out of date)

But I failed the same stunt recently, after going through a dozen or so
system tables without completely understanding them. Maybe I just
didn't want it too bad, but I am still wondering: would it be possible
for people of knowledge to go over this diagram, mark the changes in
pencil, scan it and post it here? I could then review, verify and
build a new diagram -- if that's a problem.

I often hear people argue that perl code doesn't need comments since
perl is self-documenting. A couple of times, I heard a similar
argument in regards to a database schema. C'mon, have mercy on the old
man! I feel myself like a blind electrician when I hack in the schema
without a diagram.

> I've never done anything this stupid

This is how the blind electrician got zapped:

	su root
	cd /
	ls
	rm -rf /tmp *

(automatically inserting blanks on the word boundaries and hitting CR
at the end of a paragraph is a well-known typing habit: it's cheaper
to occasionally erase extra space or a CR than stop and think
whether you need one every time. Watch out!)

--Gene




view thread (2+ messages)

Message-ID: <200011290938.DAA18551@selkovjr.xnet.com>
Permalink:  ../200011290938.DAA18551@selkovjr.xnet.com/
Also on:    postgresql.org/message-id/200011290938.DAA18551@selkovjr.xnet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: selkovjr@mcs.anl.gov, will@lashell.net
  Subject: Re: developer deleted a database directory, postgres won't start
  In-Reply-To: <200011290938.DAA18551@selkovjr.xnet.com>
  References: <20001128185133.A10709@lyrical.dpnd.com> <200011290938.DAA18551@selkovjr.xnet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox