From: | Chris Travers <chris(dot)travers(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | Matthew Byrne <matt(at)byrney(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Accidentally truncated pg_type |
Date: | 2011-07-12 01:30:18 |
Message-ID: | CAKt_ZfsjdjW_8PFwhnY8iv75rsD_rN67oqXgkCgnu1tMgkuBjA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Jul 11, 2011 at 6:25 PM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au> wrote:
> On 12/07/11 08:12, Matthew Byrne wrote:
>> I have a large database full of irreplaceable data, and due to a
>> ridiculous happenstance I accidentally executed this code (as a superuser,
>> of course):
>>
>> DELETE FROM pg_catalog.pg_type;
>>
>> Now the database is *seriously* unhappy - every SQL command returns an
>> error message. How do I get at my data?
>
> Oh, once you've copied your database you should stop the postmaster and
> not start it again without further advice/instructions. The data in
> pg_type may not have been vacuumed or overwritten yet if you haven't
> been messing about trying to fix it before asking for help.
>
Second the suggestion of copying everything. Of course with
autovacuum the chances that things have been vacuumed is not 0 and may
be fairly high depending on configuration.
In addition to those suggestions, the obvious question is:
Do you have backups? What do they contain? How old are they? What
sort of backups do you have?
Best Wishes,
Chris Travers
From | Date | Subject | |
---|---|---|---|
Next Message | Lynn Dobbs | 2011-07-12 01:54:30 | query_to_xml nulls set to false |
Previous Message | Chris Travers | 2011-07-12 01:25:58 | Re: [HACKERS] Creating temp tables inside read only transactions |