Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFLZa-00017x-Ln for pgsql-sql@arkaria.postgresql.org; Mon, 29 May 2017 14:23:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFLZa-0001Kw-8T for pgsql-sql@arkaria.postgresql.org; Mon, 29 May 2017 14:23:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFLZZ-0001Hy-Hf for pgsql-sql@postgresql.org; Mon, 29 May 2017 14:23:05 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFLZX-0000aV-0t for pgsql-sql@postgresql.org; Mon, 29 May 2017 14:23:04 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3B8F820995; Mon, 29 May 2017 10:23:02 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Mon, 29 May 2017 10:23:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=wb42alvEmw6gQfrMrH 7OP5b6uMv5nz+R/sViiUIt6/Y=; b=nptJRFesYK26UVW6FPGYWek8JUBdNRS9YD wQHRi7l9oNOliWI8ciCb4SSpnMY4MmSXuKMoN0ih7P2vDAP1JtGPfD7jMSXeg0bz dWNPCbxZSoTRPU7+7HedAR5kIcrW92krB3kDOf63oZrgUpTYX3fZ5oX/1rFx15lJ EgePYrSg22YksWp2BRjpSn84sruIrZlfVUQGKm3Y6B073KePsqcgg+pQPEKcHP9P csSE0/BG9HS2Ws09Uu3nQ2fBS+6xXHTqES3xrUV5Y6XakU0eccK84pWxG28mbvPc /rHVMZ9tyhu5QY57uqoCaLSxzzU6VptnQp3JD7d4bLPU84Y2cLWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=wb42alvEmw6gQfrMrH7OP5b6uMv5nz+R/sViiUIt6/Y=; b=BDhMPGmH HCFylKcIuALy1BgA0iG4Tvy8cvN5KYue80uW1z/K7oHvsiWcovbditKIuunl7mGH qnNb6gxP25gE+PMnt45p/h4S0WlEv7DPQpVTgJg12nsHE6oHa83ySbVqylDvNbrf ldDkiWhajQx80B3o4kiSxCIFrQmLwbJhsWpnjSR6ImYBVR6QGPKwOg0AAjXpdQez bC6d9VhNMxLfvrElN3nJ+3/hvRvXussT9GXLqoCDCIHMt/94tme9NjU4GPXT8OxO fmPxCyFx5dyBAUcunWVjhaMEuyKhi2iZiBlm1tzz37fMvYlW+amtpPtqoQjbe7/t apJtuU141FDC5Q== X-ME-Sender: X-Sasl-enc: CneB6QuC0fwBK5gMkyMJAlGYAuDBC77b5bhQjD1LU4Kp 1496067781 Received: from [192.168.1.2] (75-172-126-41.tukw.qwest.net [75.172.126.41]) by mail.messagingengine.com (Postfix) with ESMTPA id B0F052486E; Mon, 29 May 2017 10:23:01 -0400 (EDT) Subject: Re: Lost my tablespace To: tel medola , pgsql-sql@postgresql.org References: From: Adrian Klaver Message-ID: <2a418dab-d17f-9d3a-0ac4-53678c1ce16f@aklaver.com> Date: Mon, 29 May 2017 07:23:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On 05/29/2017 07:10 AM, tel medola wrote: > > I have a serious problem in my database. I have a table, divided into 4 Postgres version? > tablespaces, one in each unit (E :; G :; H:; I:), linked with So for OS some version of Windows, correct? > 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. What was the command? > If you execute the SELECT command pg_size_pretty (pg_database_size > ('database_name')), the result comes complete, as if the tables were > filled normally. What does select * from pg_tablespace; show? What does $PGDATA/pg_tblspc show? > Can someone help me please? > Thanks Roberto. -- Adrian Klaver adrian.klaver@aklaver.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql