Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFpJh-0002rI-6L for pgsql-sql@arkaria.postgresql.org; Tue, 30 May 2017 22:08:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFpJg-0006nh-P7 for pgsql-sql@arkaria.postgresql.org; Tue, 30 May 2017 22:08:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFpIf-00051H-Ma for pgsql-sql@postgresql.org; Tue, 30 May 2017 22:07:38 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFpIV-0002y5-I3 for pgsql-sql@postgresql.org; Tue, 30 May 2017 22:07:36 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C0D0D211D9; Tue, 30 May 2017 18:07:24 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Tue, 30 May 2017 18:07:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc: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=bJHeA3i8z7YsiY47GC ax/EC/crx9DYSygnX0k4SkkfQ=; b=YKEmGhQ7xyezdGclw8PozzN59PT2D/mVOg a32s4CGQ6KesdXsVMWQgHzuXkRI/LfWGFgyyDVADZaE/KpQyVws7Jeltb3c52PX9 IiklWsYnOED179FsycKyCzS0GAcvrYqccSmQA0GMezMaXDRInplvFSlC8Eqx071H FsS08Fdjttmaw6Xh86PM3FmtjALY7fQwKQYg985sLSNmmrH2uf0PAdqEtiQCNtfv +VEJ/hAIxHLesTm/GqwGtoE9SoyBERAXVxtm7xaVhdH34+OMAw8nQ2FRI62CiPm4 mTb6AvL0Z52zW5fhx+Nmdpedz5PThbzlzzyodfU3EoU0SvnpGyfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=bJHeA3i8z7YsiY47GCax/EC/crx9DYSygnX0k4SkkfQ=; b=LsAIXHhZ 15Wilj8XdFtdgu1qup8W0+QfdxxGuuV9b6UR2WeyR/YnLtV2wgD+rJGhwaXGP71R eEmFtdO438Nae7STyVLve4XZjF70lvhsChWMROcbFaHwFR/PFE56Mmstatqc19gy dknI3ajcLX6Lrs6OtAJ9WNhB8Vn4su5ee4fg3pla+4SmfM3GKppt12Zdc3oeOcPc y26ERyYsMvqAPGySucvRFvUghYUdCUvfQVctGQzdFuyDDfHLSXtuVO0A7yYt9Svs /XRHG9Kzd0/giBfGW5hMBHX7xqgmkr6a9yIJIKqqELr3hzoF5u1MULH/bPcIJfav lEW6iiqdJBAEvg== X-ME-Sender: X-Sasl-enc: llX5p1kDykHHpaYB81gpS6UHvAo//wK4BM4KhhFSNubI 1496182044 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 48F7E2444C; Tue, 30 May 2017 18:07:24 -0400 (EDT) Subject: Re: Lost my tablespace To: tel medola Cc: pgsql-sql@postgresql.org References: <32bb9df2-3b4d-95cb-1f82-8da675536a9b@aklaver.com> <100e137f-4510-031c-1fa5-51b2a145f39a@aklaver.com> <88a21207-a3c1-3e5e-88e6-a2403a0ea66b@aklaver.com> From: Adrian Klaver Message-ID: <48eeef4b-b04d-77c1-2b51-d59f23bdd203@aklaver.com> Date: Tue, 30 May 2017 15:07:23 -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/30/2017 01:36 PM, tel medola wrote: > EXACT !!!!! > > When I did the truncate, it erased all the files that referenced the > table and created a new one (empty). That's why when I returned the > physical files to the drives, it does not find the old reference and it > is empty. > > I'll search how to redo the link for the correct filenode. > Thanks very much for your help!!! > The thing to remember is: https://www.postgresql.org/docs/9.3/static/storage-file-layout.html "When a table or index exceeds 1 GB, it is divided into gigabyte-sized segments. The first segment's file name is the same as the filenode; subsequent segments are named filenode.1, filenode.2, etc. This arrangement avoids problems on platforms that have file size limitations. (Actually, 1 GB is just the default segment size. The segment size can be adjusted using the configuration option --with-segsize when building PostgreSQL.) In principle, free space map and visibility map forks could require multiple segments as well, though this is unlikely to happen in practice." and: "A table that has columns with potentially large entries will have an associated TOAST table, which is used for out-of-line storage of field values that are too large to keep in the table rows proper. pg_class.reltoastrelid links from a table to its TOAST table, if any. See Section 58.2 for more information." -- 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