Re: We need to log aborted autovacuums - Mailing list pgsql-hackers

From Tom Lane
Subject Re: We need to log aborted autovacuums
Date
Msg-id 10073.1295202054@sss.pgh.pa.us
Whole thread Raw
In response to Re: We need to log aborted autovacuums  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-hackers
Greg Smith <greg@2ndquadrant.com> writes:
> Simon Riggs wrote:
>> I'm fairly confused by this thread.

> That's becuase you think it has something to do with cancellation, which 
> it doesn't.  The original report here noted a real problem but got the 
> theorized cause wrong.

I think that cancellations are also a potentially important issue that
could do with being logged.  The issue that I see is that if an
application has a use-pattern that involves obtaining exclusive lock on
a large table fairly frequently, then AV will never be able to complete
on that table, leading to bloat and eventual XID wraparound issues.
Once we get scared about XID wraparound, AV will refuse to let itself
be canceled, so it will prevent the wraparound ... at the cost of
denying service to the application code path that wants the lock.
So this is the sort of thing that it'd be good to have some bleating
about in the log, giving the DBA a chance to rethink the app's locking
behavior before the consequences get nasty.

But, having said that, false alarms in the log are not nice.  So I'd
rather have the LOG messages coming out from actual transaction aborts
in AV, not from the remote end of the signal.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Include WAL in base backup
Next
From: Dimitri Fontaine
Date:
Subject: Re: pg_basebackup for streaming base backups