Re: [HACKERS] How to destroy your entire Postgres installation - Mailing list pgsql-hackers

From Nick Bastin
Subject Re: [HACKERS] How to destroy your entire Postgres installation
Date
Msg-id 360C3E5D.792FFB51@rbbsystems.com
Whole thread Raw
In response to How to destroy your entire Postgres installation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] How to destroy your entire Postgres installation
List pgsql-hackers
Tom Lane wrote:
>
> It's easy: just destroydb one database that has active backends
> still running in it.  Then stand back and watch the carnage.
> (Hint: back up all your *other* databases first, because you'll
> be lucky if you can still access them.)

So just for fun I tried this.. ;-)  I did a destroydb on a database with 2
active backends and only 90 megs of data, and it managed to munge through the
other running database, which is fast approaching 2 gigs, in short order.  The
first time I did it, I was able to rescue the second database just using the
audit trails that I'd built into it, but the second time it completely trashed
it.  Now I'm no programming neophyte, but can somebody explain to me why this
happened?  What exactly is destroydb doing, or am I missing something obvious here?

--
Nick Bastin
RBB Systems, Inc.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: How to destroy your entire Postgres installation
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] How to destroy your entire Postgres installation