pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Libbrecht <paul@activemath.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: accidental drop table recoverable?
Date: Mon, 14 Jul 2008 17:29:08 +0200
Message-ID: <792684B3-32A7-4F9F-ACA2-A682BF35F9E0@activemath.org> (raw)
In-Reply-To: <8259.1216046847@sss.pgh.pa.us>
References: <53CDF98F-0AE1-49ED-A2A3-C3B1E2AF2E2E@activemath.org>
	<8259.1216046847@sss.pgh.pa.us>


Le 14-juil.-08 à 16:47, Tom Lane a écrit :

> You can't really "rollback" a DROP TABLE --- that corresponds directly
> to a filesystem remove() call, and no amount of fooling around with  
> the
> database state will undo that.

That is dark.
I read yesterday night that actually a vacuum was advised everyday  
since otherwise there was no actual deletion. So you are telling me  
that, however, drop-table does really go to deletion right away?

I'm running 7.4.5 btw.

> If you have filesystem tools that will resurrect the deleted files for
> you, you could probably put them back into the database.  My  
> inclination
> would be not to try to "roll back" anything, but create new tables  
> with
> the identical column sets to the old ones (but no indexes)

this can be done easily.
But the filesystem resurrect I am doubting of. I'll hunt.

thanks!

paul

> and then rename the recovered files into place to match the new  
> tables'
> relfilenode values.
> After which, a dump and reload would be prudent to
> make sure everything's really kosher.  (Actually, copying the data  
> into
> newly created tables should be enough for that.)

sure!=

Attachments:

  smime.p7s (application/pkcs7-signature, 2.2K) download

view thread (5+ messages)  latest in thread

Message-ID: <792684B3-32A7-4F9F-ACA2-A682BF35F9E0@activemath.org>
Permalink:  ../792684B3-32A7-4F9F-ACA2-A682BF35F9E0@activemath.org/
Also on:    postgresql.org/message-id/792684B3-32A7-4F9F-ACA2-A682BF35F9E0@activemath.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: paul@activemath.org, tgl@sss.pgh.pa.us
  Subject: Re: accidental drop table recoverable?
  In-Reply-To: <792684B3-32A7-4F9F-ACA2-A682BF35F9E0@activemath.org>

* 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