pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Joshua White <joshua.white@monash.edu>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Problem creating a database
Date: Wed, 17 Oct 2018 08:19:32 +0200
Message-ID: <67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at> (raw)
In-Reply-To: <CAGY1NO=s6qMJtv-yTqoGM8hCAKTsojKdueJSk2AW+HsnDXtKOg@mail.gmail.com>
References: <CAGY1NOkYep1Mshow9aZe6wM1YipTYuL09MpR0QHDjcqbOxm0Jg@mail.gmail.com>
<cedd5ae45b99b0f4fd9b75319700bbc8cf431eec.camel@cybertec.at>
<CAGY1NOk=MFvgyjQErd3TR_+FAAOn2O0MNR_q=6udd+L-KU+VHw@mail.gmail.com>
<6f6b9febf25df823552b0d80c5eff9eeccf628d4.camel@cybertec.at>
<CAGY1NOmpFXV_1L1DFknOh-c-mVfjH6aOfZO_E92iprN-4E87sg@mail.gmail.com>
<CAGY1NO=s6qMJtv-yTqoGM8hCAKTsojKdueJSk2AW+HsnDXtKOg@mail.gmail.com>
Joshua White wrote:
> > > > > > psql: FATAL: could not open file "base/618720/2610": No such file or directory
> > >
> > > "pg_index" initially uses file 2610.
> > >
> > > Anyway, your database seems to be quite wrecked, and you'd probably need
> > > an expert to save what can be saved.
> >
> So you're right about it being seriously corrupted somehow. All my custom databases seem to work fine.
> I have data checksums and amcheck enabled and haven't found any issues using the query below.
>
> SELECT bt_index_check(index => c.oid), c.relname, c.relpages
> FROM pg_index i
> JOIN pg_opclass op ON i.indclass[0] = op.oid
> JOIN pg_am am ON op.opcmethod = am.oid
> JOIN pg_class c ON i.indexrelid = c.oid
> JOIN pg_namespace n ON c.relnamespace = n.oid
> WHERE am.amname = 'btree'
> -- Don't check temp tables, which may be from another session:
> AND c.relpersistence != 't'
> AND i.indisready AND i.indisvalid
> ORDER BY c.relpages DESC;
>
> However, when I went to connect to template1, it failed:
>
> # \connect template1
> FATAL: could not open file "base/1/2610": No such file or directory
> Previous connection kept
>
> If template1 is corrupt, that would explain why I am unable to create new databases.
Right. I think that dumping what you can and importing it in a new cluster
is the way to go.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
view thread (11+ messages)
Message-ID: <67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at> Permalink: ../67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at/ Also on: postgresql.org/message-id/67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at ·
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 from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-general@postgresql.org Cc: laurenz.albe@cybertec.at, joshua.white@monash.edu Subject: Re: Problem creating a database In-Reply-To: <67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at> References: <CAGY1NOkYep1Mshow9aZe6wM1YipTYuL09MpR0QHDjcqbOxm0Jg@mail.gmail.com> <cedd5ae45b99b0f4fd9b75319700bbc8cf431eec.camel@cybertec.at> <CAGY1NOk=MFvgyjQErd3TR_+FAAOn2O0MNR_q=6udd+L-KU+VHw@mail.gmail.com> <6f6b9febf25df823552b0d80c5eff9eeccf628d4.camel@cybertec.at> <CAGY1NOmpFXV_1L1DFknOh-c-mVfjH6aOfZO_E92iprN-4E87sg@mail.gmail.com> <CAGY1NO=s6qMJtv-yTqoGM8hCAKTsojKdueJSk2AW+HsnDXtKOg@mail.gmail.com> <67e0670089d73d995759725ef42b59cd85ff0d84.camel@cybertec.at> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
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