pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bob Lunney <blunney@meetme.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ondřej Světlík <osvetlik@flexibee.eu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Autovacuum of pg_database
Date: Mon, 9 May 2016 21:21:31 -0400
Message-ID: <0E0FB1FC-41FE-4156-9CE8-535837D6FC81@meetme.com> (raw)
In-Reply-To: <4352.1462833746@sss.pgh.pa.us>
References: <20160509213030.GA496423@alvherre.pgsql>
	<4023.1462833047@sss.pgh.pa.us>
	<4352.1462833746@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

I had the same problem with 9.1 and vacuuming several databases simultaneously.  We just lived with it.  Other tables in the databases were far larger than pg_sharedepend, so it wasn't the most significant issue we faced.

Bob Lunney


> On May 9, 2016, at 6:42 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> I wrote:
>> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>>> Now that I actually tried this, it turned out that this problem is not
>>> so simple.  vacuum.c already has logic to use conditional acquire of the
>>> table-level lock, and if not available it skips the table:
>>> LOG:  skipping vacuum of "pg_shdepend" --- lock not available
>>> so an autovacuum worker is never "stuck" behind another worker trying to
>>> vacuum the table.
> 
>> Hmm ... but then, how do we have the observed symptom of several workers
>> concurrently trying to process the same shared catalog?  Seems like all
>> but one should fall out at this point.
> 
> Oh, see table_recheck_autovac:
> 
>        tab->at_vacoptions = VACOPT_SKIPTOAST |
>            (dovacuum ? VACOPT_VACUUM : 0) |
>            (doanalyze ? VACOPT_ANALYZE : 0) |
>            (!wraparound ? VACOPT_NOWAIT : 0);
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> I'll bet they're all trying to do anti-wraparound vacuums.  This would
> explain why the problem hasn't been observed often enough to have been
> fixed long since.
> 
> 			regards, tom lane
> 
> 
> -- 
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (28+ messages)  latest in thread

Message-ID: <0E0FB1FC-41FE-4156-9CE8-535837D6FC81@meetme.com>
Permalink:  ../0E0FB1FC-41FE-4156-9CE8-535837D6FC81@meetme.com/
Also on:    postgresql.org/message-id/0E0FB1FC-41FE-4156-9CE8-535837D6FC81@meetme.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: blunney@meetme.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, osvetlik@flexibee.eu
  Subject: Re: Autovacuum of pg_database
  In-Reply-To: <0E0FB1FC-41FE-4156-9CE8-535837D6FC81@meetme.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox