Re: [SQL] Lost my tablespace - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Lost my tablespace
Date
Msg-id 10661.1496072579@sss.pgh.pa.us
Whole thread Raw
In response to [SQL] Lost my tablespace  (tel medola <tel.medola@gmail.com>)
List pgsql-sql
tel medola <tel.medola@gmail.com> writes:
> I have a serious problem in my database. I have a table, divided into 4
> tablespaces, one in each unit (E :; G :; H:; I:), linked with inheritance,
> of approximately 500 gb each. It happens that a truncate was done in the
> main table without undoing the inheritance for the other tables and
> consequently the "daughters" tables were cleaned together with the main
> one. I lost everything! But ... I have the backup of all drives and I have
> already done the data restore. Everything has been successfully retrieved,
> however the table is listed as 8192 bytes in postgres, but the units are
> all as they were before the truncate was executed.
> Is there any way Postgres redo the link with the child tables ?? I already
> ran the command to rewrite inheritance, but the size of the tables
> continues with 8192.

This doesn't sound like a problem.  This sounds like a misunderstanding
of what table size means.  If you do "select from" the main table, do
you see rows from the child tables?  If so, the inheritance is fine.
        regards, tom lane



pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [SQL] Lost my tablespace
Next
From: tel medola
Date:
Subject: Re: [SQL] Lost my tablespace