Rebuild pg_toast from scratch?

From: Moreno Andreo <moreno(dot)andreo(at)evolu-s(dot)it>
To: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Rebuild pg_toast from scratch?
Date: 2019-09-05 12:12:27
Message-ID: c0032b94-b519-187c-cb11-3a535df20b6b@evolu-s.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
    I have an issue with a Windows 10 PC with Postgres 9.1 x86.
Running some SELECTs we got "ERROR: could not open file
"base/48121/784576": No such file or directory"

I then ran

select
n.nspname AS tableschema,
    c.relname AS tablename
from pg_class c
inner join pg_namespace n on (c.relnamespace = n.oid)
where c.relfilenode = 784576;

and discovered that the involved table is pg_toast_49713.

Now I need to recreate an empty copy of this table (data can be
recovered later), how can I achieve this?

Thanks in advance
Moreno.-

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2019-09-05 13:32:00 Re: floating point output
Previous Message Andreas Joseph Krogh 2019-09-05 09:12:03 Re: Uninstall postgres