[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-admin
Subject: Re: Pg_stat_statements
From: Rajesh Kumar <rajeshkumar.dba09 () gmail ! com>
Date: 2023-11-23 7:51:14
Message-ID: CAJk5AtYMmoJH-dhRXjoXf-k=7k5tpHrJ1DG-VCBBMHcRuweDEQ () mail ! gmail ! com
[Download RAW message or body]
Thanks, I'll check them out.
On Thu, 23 Nov 2023, 13:03 Laurenz Albe, <laurenz.albe@cybertec.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
>
[Attachment #3 (text/html)]
<div dir="auto">Thanks, I'll check them out. </div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 23 Nov 2023, 13:03 \
Laurenz Albe, <<a \
href="mailto:laurenz.albe@cybertec.at">laurenz.albe@cybertec.at</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 2023-11-23 at 11:17 +0530, \
Rajesh Kumar wrote:<br> > I connected to default postgres database and queried \
select* from pg_stat_statements<br> > and getting error "pg_attribute catalog \
is missing 43 attribute(s)". Whereas when I<br> > connect to other databases, \
I am able to query and find starts of statements without<br> > any problem.<br>
> <br>
> How to resolve this issue?<br>
<br>
Looks like data corruption.<br>
Since you probably don't remember what you did to that poor database, some \
ideas:<br> <br>
1. DROP EXTENSION pg_stat_statements;<br>
CREATE EXTENSION pg_stat_statements;<br>
<br>
If that doesn't do the trick:<br>
<br>
2. \c template1<br>
DROP DATABASE postgres;<br>
CREATE DATABASE postgres TEMPLATE template0 OWNER postgres;<br>
\c postgres<br>
CREATE EXTENSION pg_stat_statements;<br>
<br>
Yours,<br>
Laurenz Albe<br>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic