Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFP0T-0001VK-Cn for pgsql-sql@arkaria.postgresql.org; Mon, 29 May 2017 18:03:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFP0S-0006lj-7Q for pgsql-sql@arkaria.postgresql.org; Mon, 29 May 2017 18:03:04 +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 1dFOzR-00051h-KL for pgsql-sql@postgresql.org; Mon, 29 May 2017 18:02:02 +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 1dFOzJ-0003R4-QW for pgsql-sql@postgresql.org; Mon, 29 May 2017 18:02:01 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1B9F120BC3; Mon, 29 May 2017 14:01:52 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Mon, 29 May 2017 14:01:52 -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=fcQIGE8qXWq884op2N joZDV2gWH1PidNpdA6M8bUJm8=; b=dRQEikN1yUYVslRZmjzXrP8gWWA58xPbfh SkWOar3nx92vDqebS/PRQQeZmSVPHT86kj4er5SNSJTiVSMrHNSOwxu0KUDDf78W l2PNBA9JwBmZ6KYR+tIiawMJ4U3atFdsgt8SHnSQVuni0qhQHOHkDKEV2ark3fB0 0wG50F3VjewLDJfA8puMBhBHoboXhlEsns2WUDw7zHEb1OS0FIulCVK2uIS+2pve QI4pnfq38Ol6RY0bHJJ4LI+lnBaJuLyrH0FA90pq414hGwVe72V9Xfirf9qDSERs eg7xjf4euVhwMgHtcTvoTNP4lSlwHcrWLxJgv+WdvCyoT6qTfCTw== 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=fcQIGE8qXWq884op2NjoZDV2gWH1PidNpdA6M8bUJm8=; b=CEscP5ij m/x0+h7nPXq3THFVaSnrhvbPKtyH6nWzR+h4QBL9Rv57uRqaY90QV2wOxMXUX2ak 0Y6ry/SjxZpyasNUZ4wqvc6BxQwHQIRefonAdGzzr0wdahSKCl0dTvJnxFB7y+Ig WzBqjnhmftidgrsPvVzFGk34fTN6Oj2ZtggfQnmCN3tBGMt1S8f+FuXsK/zPhSPS RJuAoj1XK89hyrA+0Xfj/3sF7TvwGEij0h2vK2Z/kFZIrp9whwBs+H3IXoovLwaN RAXXoZxlt3omA6ZnK3jMf+TzJidtw5oN+Ua/0+In+yW+zcD71irrt+qb5EJo3AUT xSPccm+deGFJPg== X-ME-Sender: X-Sasl-enc: dKdL/GREhB9qE93hXnyKK+/IMiymBMGPfwZrlD5jSvFl 1496080911 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 799722444C; Mon, 29 May 2017 14:01:51 -0400 (EDT) Subject: Re: Lost my tablespace To: tel medola Cc: pgsql-sql@postgresql.org References: <2a418dab-d17f-9d3a-0ac4-53678c1ce16f@aklaver.com> <97bd2743-46c3-32c4-7b3f-62def38aea65@aklaver.com> From: Adrian Klaver Message-ID: Date: Mon, 29 May 2017 11:01:50 -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 08:46 AM, tel medola wrote: > What was the command? > > In psql: \d As to below: 1) In the below you are saying that you used that template to try to recreate the original tables, correct? 2) Why the INHERIT/NO INHERIT/INHERIT sequence? 3) If 1) is correct did the COPY actually do anything? > / > / > /CREATE TABLESPACE OWNER postgres LOCATION 'j:\';/ > / > / > /CREATE SCHEMA "" AUTHORIZATION postgres;/ > / > / > /CREATE TABLE "". (LIKE public.repositorio INCLUDING > STORAGE INCLUDING INDEXES INCLUDING DEFAULTS INCLUDING CONSTRAINTS ) > INHERITS ( public.
) TABLESPACE ;/ > / > / > /ALTER TABLE "".
NO INHERIT public.
;/ > / > / > /copy from public.
to .
;/ > / > / > /truncate public.
/ > / > / > /ALTER TABLE "".
INHERIT public.
;/ > > > > My mistake I should have asked for: > > select oid, * from pg_tablespace; > > Please run the command as above. > / > / > /oidspcnamespcownerspcaclspcoptions/ > /1663pg_default10/ > /1664pg_global10/ > /2193601disco0110/ > /5205910disco0210/ > /7245095disco0310/ > /9277962disco0410/ > /11242858disco0510/ > So the OIDS in pg_tblspc match the links. -- 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