agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: tel medola <tel.medola@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Lost my tablespace
Date: Mon, 29 May 2017 11:42:59 -0400
Message-ID: <10661.1496072579@sss.pgh.pa.us> (raw)
In-Reply-To: <CANRMYmgu3ddSU62-=a3QCnsbGYuMVJXZ-ydTm7vd_2TQLp-Oqg@mail.gmail.com>
References: <CANRMYmgu3ddSU62-=a3QCnsbGYuMVJXZ-ydTm7vd_2TQLp-Oqg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
view thread (25+ messages) latest in thread
Message-ID: <10661.1496072579@sss.pgh.pa.us>
Permalink: ../10661.1496072579@sss.pgh.pa.us/
Also on: postgresql.org/message-id/10661.1496072579@sss.pgh.pa.us
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, tel.medola@gmail.com
Subject: Re: Lost my tablespace
In-Reply-To: <10661.1496072579@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox