Re: Pg_stat_statements

From: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Pg_stat_statements
Date: 2023-11-23 07:50:55
Message-ID: CAJk5AtYMmoJH-dhRXjoXf-k=7k5tpHrJ1DG-VCBBMHcRuweDEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks, I'll check them out.

On Thu, 23 Nov 2023, 13:03 Laurenz Albe, <laurenz(dot)albe(at)cybertec(dot)at> wrote:

> On Thu, 2023-11-23 at 11:17 +0530, Rajesh Kumar wrote:
> > I connected to default postgres database and queried select* from
> pg_stat_statements
> > and getting error "pg_attribute catalog is missing 43 attribute(s)".
> Whereas when I
> > connect to other databases, I am able to query and find starts of
> statements without
> > any problem.
> >
> > How to resolve this issue?
>
> Looks like data corruption.
> Since you probably don't remember what you did to that poor database, some
> ideas:
>
> 1. DROP EXTENSION pg_stat_statements;
> CREATE EXTENSION pg_stat_statements;
>
> If that doesn't do the trick:
>
> 2. \c template1
> DROP DATABASE postgres;
> CREATE DATABASE postgres TEMPLATE template0 OWNER postgres;
> \c postgres
> CREATE EXTENSION pg_stat_statements;
>
> Yours,
> Laurenz Albe
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Victor Sudakov 2023-11-23 09:58:48 Enable data checksums in a multi-node cluster without downtime
Previous Message Laurenz Albe 2023-11-23 07:33:12 Re: Pg_stat_statements