Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ai1ru-00051g-CP for pgsql-admin@arkaria.postgresql.org; Mon, 21 Mar 2016 15:35:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ai1rt-0004o8-QQ for pgsql-admin@arkaria.postgresql.org; Mon, 21 Mar 2016 15:35:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ai1rt-0004o2-CM for pgsql-admin@postgresql.org; Mon, 21 Mar 2016 15:35:45 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1ai1ro-0004Ne-H7 for pgsql-admin@postgresql.org; Mon, 21 Mar 2016 15:35:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20140207; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date; bh=nqk/y/aKUux5RKT527RCHY7SsjY/JOEPj/m4yuPYTx4=; b=TaA70+VPS4G1krZwtz85PH9WKS OgaKMmFPQuKVyijKPJp40V1zlBHYAMqa3Xm1gbODPseNOw8wUO83AZXMqy0P3I80CsD8rWW5v6ETu 75P1re41fpb1MvAMly+LGRl8Z; Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.86_2) (envelope-from ) id 1ai1rm-0003so-91; Mon, 21 Mar 2016 16:35:38 +0100 Date: Mon, 21 Mar 2016 16:35:38 +0100 From: hubert depesz lubaczewski To: Nicolas Aubert Cc: pgsql-admin@postgresql.org Subject: Re: vacuum analyse waiting Message-ID: <20160321153537.GA14547@depesz.com> Reply-To: depesz@depesz.com References: <20160321110250.GE14681@depesz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Mon, Mar 21, 2016 at 04:26:40PM +0100, Nicolas Aubert wrote: > the vacuum process is the 22510 > here is what I found in pg_locks > > > virtualtransaction | pid | mode | granted | fastpath > ------------+---------------+---------+-------+----------+--------------------+-------+--------------------------+---------+---------- > > 3/376480 | 22510 | ExclusiveLock | t | > | | | | | > 3/376480 | 22510 | ShareUpdateExclusiveLock | f | f > I'm sure there are more columns in pg_locks. What you need to find is the rows with pid of vacuum, that have granted = 'false', and see what the lock is on (the columns you ignored). Then you check what has conflicting locks on the required things. Best regards, depesz -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin