Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxWl8-0002p4-Ms for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 10:09:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxWl8-0005zV-6t for pgsql-hackers@arkaria.postgresql.org; Fri, 21 Oct 2016 10:09:06 +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 1bxWl7-0005zP-MM for pgsql-hackers@postgresql.org; Fri, 21 Oct 2016 10:09:05 +0000 Received: from mail-lf0-x231.google.com ([2a00:1450:4010:c07::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bxWl4-0004Rh-0C for pgsql-hackers@postgresql.org; Fri, 21 Oct 2016 10:09:05 +0000 Received: by mail-lf0-x231.google.com with SMTP id x79so143180209lff.0 for ; Fri, 21 Oct 2016 03:09:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HQmzuDtgCBytqzeJuso6T1Wa8Bln5Pao3KsvgQxQUag=; b=WedvYcVb2cS7i6AxGydgJcBE01CEZWiFcI71YO2YWu7AN2M5KOtKK5+bs7xBhdo4Ng zJwW1XbRZsE5jlOaBipKPlZ2bxTI+ZIF0lopXFK5dvqy0QedkBb0AbHtBFjvRehi39Bu 9bNAtOwme25hQOzFYB93Xp7GvuVW5j/Zt+1X0B2jjRnZI5/nyGogIBSNcztA15EqeRxc mGdta7/ZeP5QcQv4STMqNKujwG5yB/jcFTl10Bwf+wSH7KRZVS/YJNmrsw5VQCrfHxev PJHQFYWKlU0fBo3wJu1ku6hOMKlcKwXtm++bHgid2Ewx3Oav3ehPKWwiK9SKJREtfMDr RLHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HQmzuDtgCBytqzeJuso6T1Wa8Bln5Pao3KsvgQxQUag=; b=WX9VIjq6XT7MscwNwhNi9sSVmWCOMp9Aiis/rCnCKmVk4dy49n5w3OuUIZLTqX15uq jJJdMv40Sl0wy+q5Mk8XhbCem7fJNWYlQvOtfsOdcPCHXBOec/zNeCjtuMuooC/s3Vii SmmhQieaTWdgAU8u3IdSaKe52MoCFtY+YjZsqX8mRgi+r0guzIFV5+Vew07XMROUjnP2 1LRWz6PlTlA3xjycdgtAhxX/KfqJdlIWJrJkZIJOaUGYZzWOwdn6fNWRBMdeTpZy81CI nM0PP5szp4FMkVcRleaHBE8YCT1J2DAn3fxSB/0At2D26YibQJ95uBwQqY/z2PeiC+ol oF4w== X-Gm-Message-State: ABUngvc+B3CM/I24qBfikbn2Z84hZ4Z90CxzJS0XO/VZWc97I89xf/ShtxYOq879gDK9Sw== X-Received: by 10.25.141.3 with SMTP id p3mr17337lfd.157.1477044541449; Fri, 21 Oct 2016 03:09:01 -0700 (PDT) Received: from ppg (mail.postgrespro.ru. [93.174.131.138]) by smtp.gmail.com with ESMTPSA id u14sm303441lja.46.2016.10.21.03.09.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 03:09:01 -0700 (PDT) Date: Fri, 21 Oct 2016 13:08:58 +0300 From: "Constantin S. Pan" To: Michael Paquier Cc: Grigory Smolkin , PostgreSQL mailing lists Subject: Re: Fun fact about autovacuum and orphan temp tables Message-ID: <20161021130858.620751f1@ppg> In-Reply-To: References: <7b7f3e98-9753-3fa9-aaa4-b6f8a766c251@postgrespro.ru> <20161020153024.19cbc758@ppg> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Fri, 21 Oct 2016 14:29:24 +0900 Michael Paquier wrote: > That's invasive. I am wondering if a cleaner approach here would be a > flag in deleteOneObject() that performs the lock cleanup, as that's > what you are trying to solve here. The problem occurs earlier, at the findDependentObjects step. All the objects inside the namespace are being locked before any of them gets deleted, which leads to the "too many locks" condition. Cheers, Constantin Pan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers