Re: [HACKERS] 6.5.2 vacuum NOTICE messages

Lists: pgsql-hackers
From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: pgsql-hackers(at)postgresql(dot)org
Subject: 6.5.2 vacuum NOTICE messages
Date: 1999-10-05 14:58:00
Message-ID: Pine.GSO.3.96.SK.991005185227.4801Q-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

I have a cron job which vaccuming database every hour
(say for testing purposes) and sometimes I get following messages:

NOTICE: Index hits_pkey: NUMBER OF INDEX' TUPLES (10003) IS NOT THE SAME AS
HEAP' (10004)
NOTICE: Index hits_pkey: NUMBER OF INDEX' TUPLES (10003) IS NOT THE SAME AS
HEAP' (10004)

This happens on Linux 2.0.37, postgresql 6.5.2

What does it means ? Why it's happens not every time script runs ?
What's the best way to get rid off this problem except dump/reload ?

The script is here:

/usr/local/pgsql/bin/psql -tq discovery <vacuum_hits.sql

vacuum_hits.sql:

begin work;
vacuum analyze hits(msg_id);
drop index hits_pkey;
create unique index hits_pkey on hits(msg_id);
end work;

Regards,

Oleg

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83


From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] 6.5.2 vacuum NOTICE messages
Date: 1999-10-06 01:16:36
Message-ID: 37FAA2F4.4F45EDA4@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Oleg Bartunov wrote:
>
> Hi,
>
> I have a cron job which vaccuming database every hour
> (say for testing purposes) and sometimes I get following messages:
>
> NOTICE: Index hits_pkey: NUMBER OF INDEX' TUPLES (10003) IS NOT THE SAME AS
> HEAP' (10004)
> NOTICE: Index hits_pkey: NUMBER OF INDEX' TUPLES (10003) IS NOT THE SAME AS
> HEAP' (10004)
>
> This happens on Linux 2.0.37, postgresql 6.5.2
>
> What does it means ? Why it's happens not every time script runs ?
> What's the best way to get rid off this problem except dump/reload ?

Re-build indices.

>
> The script is here:
>
> /usr/local/pgsql/bin/psql -tq discovery <vacuum_hits.sql
>
> vacuum_hits.sql:
>
> begin work;
> vacuum analyze hits(msg_id);

You MUST NOT run vacuum inside BEGIN/END!

> drop index hits_pkey;
> create unique index hits_pkey on hits(msg_id);
> end work;

Vadim