agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Adrian Klaver <adrian.klaver@aklaver.com>
To: tel medola <tel.medola@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Lost my tablespace
Date: Mon, 29 May 2017 11:01:50 -0700
Message-ID: <a9063a7d-ac70-abb8-38f4-6ef49bf401f3@aklaver.com> (raw)
In-Reply-To: <CANRMYmhxARYp73boRCfHB5VHDFT+wM5G=kTGrCQcN0Ds=uxLWw@mail.gmail.com>
References: <CANRMYmgu3ddSU62-=a3QCnsbGYuMVJXZ-ydTm7vd_2TQLp-Oqg@mail.gmail.com>
<2a418dab-d17f-9d3a-0ac4-53678c1ce16f@aklaver.com>
<CANRMYmjbg6MFhB=3wo6tcueUL8mqmqRfysSYrgRFHUu04Mxrwg@mail.gmail.com>
<97bd2743-46c3-32c4-7b3f-62def38aea65@aklaver.com>
<CANRMYmhxARYp73boRCfHB5VHDFT+wM5G=kTGrCQcN0Ds=uxLWw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>
On 05/29/2017 08:46 AM, tel medola wrote:
> What was the command?
>
>
In psql:
\d <The various tables involved>
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 <tablespace> OWNER postgres LOCATION 'j:\';/
> /
> /
> /CREATE SCHEMA "<new schema>" AUTHORIZATION postgres;/
> /
> /
> /CREATE TABLE "<new schema>".<table> (LIKE public.repositorio INCLUDING
> STORAGE INCLUDING INDEXES INCLUDING DEFAULTS INCLUDING CONSTRAINTS )
> INHERITS ( public.<table>) TABLESPACE <tablespace>;/
> /
> /
> /ALTER TABLE "<new schema>".<table> NO INHERIT public.<table>;/
> /
> /
> /copy from public.<table> to <new schema>.<table>;/
> /
> /
> /truncate public.<table>/
> /
> /
> /ALTER TABLE "<new schema>".<table> INHERIT public.<table>;/
>
>
>
> 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
view thread (25+ messages) latest in thread
Message-ID: <a9063a7d-ac70-abb8-38f4-6ef49bf401f3@aklaver.com>
Permalink: ../a9063a7d-ac70-abb8-38f4-6ef49bf401f3@aklaver.com/
Also on: postgresql.org/message-id/a9063a7d-ac70-abb8-38f4-6ef49bf401f3@aklaver.com
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: adrian.klaver@aklaver.com, tel.medola@gmail.com
Subject: Re: Lost my tablespace
In-Reply-To: <a9063a7d-ac70-abb8-38f4-6ef49bf401f3@aklaver.com>
* 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