Thread: VACUUM warning/error (?)

VACUUM warning/error (?)

From
Nicolas Kowalski
Date:
Hello.

We are running a small Intranet database, using PostgreSQL 7.0.2 on a
Debian GNU/Linux 2.2 server. All works fine. Great job PostgreSQL guys !

However, I used to backup our database every night (pg_dumpall), and
now, I want to clean up it just before the dump, when nobody uses it.
The command is :

# echo "VACUUM" | su -c "psql datavm" - postgres


...but the cron daemon just told me this morning :

NOTICE:  FlushRelationBuffers(trace_sql, 162): block 239 is referenced
(private
0, global 1)
FATAL 1:  VACUUM (vc_repair_frag): FlushRelationBuffers returned -2
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
connection to server was lost


All seems to work, in particular this 'trace_sql' table, but what does
mean this error message ?

Thanks.
Niko.


Re: VACUUM warning/error (?)

From
Tom Lane
Date:
Nicolas Kowalski <Nicolas.Kowalski@imag.fr> writes:
> NOTICE:  FlushRelationBuffers(trace_sql, 162): block 239 is referenced
> (private
> 0, global 1)
> FATAL 1:  VACUUM (vc_repair_frag): FlushRelationBuffers returned -2
> pqReadData() -- backend closed the channel unexpectedly.
>         This probably means the backend terminated abnormally
>         before or while processing the request.
> connection to server was lost

> All seems to work, in particular this 'trace_sql' table, but what does
> mean this error message ?

It's complaining about a buffer reference count leakage --- most likely
due to the bug in 7.0.* whereby a backend may fail to run transaction-
abort code before shutting down, if the client disconnects in the middle
of a transaction block.

You could get rid of the immediate problem by restarting the postmaster,
but I recommend updating to 7.0.3 to fix the real bug.

            regards, tom lane