pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Rebuild pg_toast from scratch? 4+ messages / 2 participants [nested] [flat]
* Rebuild pg_toast from scratch? @ 2019-09-05 12:12 Moreno Andreo <moreno.andreo@evolu-s.it> 0 siblings, 1 reply; 4+ messages in thread From: Moreno Andreo @ 2019-09-05 12:12 UTC (permalink / raw) To: 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.- ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Rebuild pg_toast from scratch? @ 2019-09-05 13:53 Tom Lane <tgl@sss.pgh.pa.us> parent: Moreno Andreo <moreno.andreo@evolu-s.it> 0 siblings, 1 reply; 4+ messages in thread From: Tom Lane @ 2019-09-05 13:53 UTC (permalink / raw) To: Moreno Andreo <moreno.andreo@evolu-s.it>; +Cc: pgsql-general Moreno Andreo <moreno.andreo@evolu-s.it> writes: > I have an issue with a Windows 10 PC with Postgres 9.1 x86. You realize 9.1 is long out of support ... > Running some SELECTs we got "ERROR: could not open file > "base/48121/784576": No such file or directory" Ugh :-( > Now I need to recreate an empty copy of this table (data can be > recovered later), how can I achieve this? TRUNCATE ought to be enough. regards, tom lane ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Rebuild pg_toast from scratch? @ 2019-09-05 16:20 Moreno Andreo <moreno.andreo@evolu-s.it> parent: Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 4+ messages in thread From: Moreno Andreo @ 2019-09-05 16:20 UTC (permalink / raw) To: pgsql-general@lists.postgresql.org Hi Tom and thanks for your time, Il 05/09/19 15:53, Tom Lane ha scritto: > Moreno Andreo <moreno.andreo@evolu-s.it> writes: >> I have an issue with a Windows 10 PC with Postgres 9.1 x86. > You realize 9.1 is long out of support ... Absolutely :-) I'm about to migrate it to 11 > Now I need to recreate an empty copy of this table (data can be > recovered later), how can I achieve this? > TRUNCATE ought to be enough. truncate pg_toast_49713; ERROR: relation "pg_toast_49713" does not exist :-\ ... or do I need to truncate the "master" table (the table blobs are in)? Thanks ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Rebuild pg_toast from scratch? @ 2019-09-05 16:37 Tom Lane <tgl@sss.pgh.pa.us> parent: Moreno Andreo <moreno.andreo@evolu-s.it> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2019-09-05 16:37 UTC (permalink / raw) To: Moreno Andreo <moreno.andreo@evolu-s.it>; +Cc: pgsql-general@lists.postgresql.org Moreno Andreo <moreno.andreo@evolu-s.it> writes: > Il 05/09/19 15:53, Tom Lane ha scritto: >> TRUNCATE ought to be enough. > ... or do I need to truncate the "master" table (the table blobs are in)? Yeah, that one. regards, tom lane ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-09-05 16:37 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-09-05 12:12 Rebuild pg_toast from scratch? Moreno Andreo <moreno.andreo@evolu-s.it> 2019-09-05 13:53 ` Tom Lane <tgl@sss.pgh.pa.us> 2019-09-05 16:20 ` Moreno Andreo <moreno.andreo@evolu-s.it> 2019-09-05 16:37 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox