Re: Lost my tablespace

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: tel medola <tel(dot)medola(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Lost my tablespace
Date: 2017-05-30 13:22:03
Message-ID: b7598d9a-eef6-1ff3-7d30-19838b3add51@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 05/30/2017 05:11 AM, tel medola wrote:
> Sorry by delay....
>
>
> The copy being the file system drive backups of each tablespace?
> /
> /
> /Yes/
> /
> /
> Then the below from your original post means?/
> /
> /That despite recovering the backup, I can not access my data. So I
> posted that I lost my tablespaces./
>
> When I run the \ d + command the involved tables are not shown. Not even
> the one I can access via Select (only those that are in the public
> schema are shown)

So how did you get the below?

>
> / Esquema | Nome | Tipo | Dono | Tamanho | Descrição/
> /----------+-------------+--------+----------+------------+-----------/
> / 01052016 | repositorio | tabela | postgres | 8192 bytes |/
> / 05122016 | repositorio | tabela | postgres | 8192 bytes |/
> / 13042017 | repositorio | tabela | postgres | 491 GB |/
> / 22082016 | repositorio | tabela | postgres | 8192 bytes |/
> / 30122015 | repositorio | tabela | postgres | 8192 bytes |/
>

What does:

show search_path;

return?

Did you try my previous suggestions:

You will either need to set the search_path to all the schemas involved,
see example at bottom of page below:

https://www.postgresql.org/docs/9.6/static/sql-set.html

or schema.qualify the table name passed to \d+:

\d+ some_schema.table_name

As examples:

SET search_path TO 01052016, 05122016 , 13042017, 22082016, 30122015
public;

or

For a single object(table, view, sequence) in a schema:

\d+ 01052016.repositorio

For all in a schema:

\d+ 01052016.*

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message tel medola 2017-05-30 13:50:21 Re: Lost my tablespace
Previous Message Eliober Cleger Despaigne 2017-05-30 12:20:30 Re: about LEFT and INNER JOIN