Re: Redo the filenode link in tablespace

From: tel medola <tel(dot)medola(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Redo the filenode link in tablespace
Date: 2017-06-06 11:40:04
Message-ID: CANRMYmjmM=PekeB2NgOrS5ghkb8-5R5d-UNp4vjTRA3rZhVrCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Lets go:
In my plsql:
rai=# select oid, * from pg_class where relfilenode = 5214489;

Result:
oid | relname | relnamespace | reltype | reloftype | relowner |
relam | relfilenode | reltablespace | relpages | reltuples |
relallvisible | reltoastrelid | reltoastidxid | relhasindex | relisshared |
relpersistence | relkind | relnatts | relchecks | relhasoids | relhaspkey |
relhasrules | relhastriggers | relhassubclass | relispopulated |
relfrozenxid | relminmxid | relacl | reloptions
---------+-------------+--------------+---------+-----------+----------+-------+-------------+---------------+----------+--------------+---------------+---------------+---------------+-------------+-------------+----------------+---------+----------+-----------+------------+------------+-------------+----------------+----------------+----------------+--------------+------------+--------+------------
5214489 | repositorio | 5205962 | 5214491 | 0 | 10 |
0 | 5214489 | 5205910 | 79303 | 1.31566e+006 | 79303
| 5214493 | 0 | t | f | p
| r | 7 | 0 | f | t | f |
f | f | t | 9360288 |
1 | |
(1 registro)

Ok?

2017-06-05 20:13 GMT-03:00 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>:

> On 06/05/2017 04:07 PM, tel medola wrote:
>
>> Hi,
>> attachment.
>>
>> select:
>> select * from pg_class where relfilenode = 5214489
>>
>
> Next, what do you get from:
>
> In psql
> => \x
> Expanded display is on.
>
> select oid, * from pg_class where oid = 5214493;
>
> No need to create an attachment, just cut and paste into message.
>
>
>
>> Thanks
>>
>> 2017-06-05 16:02 GMT-03:00 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
>>
>> On 06/05/2017 11:55 AM, tel medola wrote:
>>
>> show?
>> /Yes/
>>
>>
>> Yes, what?
>>
>> Please run the command as shown:
>>
>> select * from pg_class where relfilenode = 5214489;
>>
>> and show the result.
>>
>>
>> Do not delete the pg_statistic table. I would not even delete
>> from it.
>> /Sorry, I already deleted it. I looked for something official
>> and found in the site in postgres the reference that the delete
>> could be done
>> (https://www.postgresql.org/docs/9.1/static/release-7-4-2.html
>> <https://www.postgresql.org/docs/9.1/static/release-7-4-2.html>)
>> and I ended up doing it. Now I'm running a vacuum analyze across
>> the base./
>>
>>
>> 2017-06-05 15:41 GMT-03:00 Adrian Klaver
>> <adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com
>>
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>>:
>>
>>
>> On 06/05/2017 07:17 AM, tel medola wrote:
>>
>> Done.
>> I followed the steps below after reconnecting the
>> filenode:
>>
>> Select * from "05122016".repositorio
>> Count -> 0
>>
>> Then, I execute the commands:
>> Analyze "05122016".repositorio;
>> Count -> 0
>> Reindex "05122016".repositorio;
>> Count -> 1509046
>> Yes!
>>
>> But...
>>
>>
>> select * from "05122016".repository where id_documento =
>> '{A647885D-9738-4617-ACE6-6351F6ADD341}'
>>
>> Returns the error below:
>> Missing chunk number 0 for toast value 10259186 in
>> pg_toast_9277966
>>
>>
>> What does:
>>
>> select * from pg_class where relfilenode = 5214489;
>>
>> show?
>>
>>
>>
>> I read in the forum to run the command:
>> Delete from pg_statistic;
>> Reindex table pg_statistic;
>> Vacuum analyze;
>>
>> Is it okay to delete the pg_statistic table?
>>
>>
>> Do not delete the pg_statistic table. I would not even
>> delete from it.
>>
>> -- Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com
>> <mailto:adrian(dot)klaver(at)aklaver(dot)com>>
>>
>>
>>
>>
>> -- Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-06-06 13:37:12 Re: Redo the filenode link in tablespace
Previous Message Michael Paquier 2017-06-06 05:04:15 Re: Replication slot and pg_rewind