Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aS70m-0006uM-CE for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Feb 2016 17:51:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aS70l-0007jX-Ot for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Feb 2016 17:51:07 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aS70l-0007jM-9A for pgsql-hackers@postgresql.org; Sat, 06 Feb 2016 17:51:07 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aS70i-0008Ie-Ux for pgsql-hackers@postgresql.org; Sat, 06 Feb 2016 17:51:06 +0000 Received: from mfilter19-d.gandi.net (mfilter19-d.gandi.net [217.70.178.147]) by relay2-d.mail.gandi.net (Postfix) with ESMTP id D135AC5A5C; Sat, 6 Feb 2016 18:51:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter19-d.gandi.net Received: from relay2-d.mail.gandi.net ([IPv6:::ffff:217.70.183.194]) by mfilter19-d.gandi.net (mfilter19-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id QMrlOmYqp-2W; Sat, 6 Feb 2016 18:51:01 +0100 (CET) X-Originating-IP: 98.122.164.227 Received: from [192.168.10.146] (unknown [98.122.164.227]) (Authenticated sender: adsend@dunslane.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 78334C5A5A; Sat, 6 Feb 2016 18:51:00 +0100 (CET) Subject: Re: proposal: make NOTIFY list de-duplication optional To: Tom Lane , Robert Haas References: <7647.1454723392@sss.pgh.pa.us> Cc: =?UTF-8?Q?Filip_Rembia=c5=82kowski?= , Pgsql Hackers From: Andrew Dunstan Message-ID: <56B63283.4050508@dunslane.net> Date: Sat, 6 Feb 2016 12:50:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <7647.1454723392@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 02/05/2016 08:49 PM, Tom Lane wrote: > Yeah, I agree that a GUC for this is quite unappetizing. Agreed. > > One idea would be to build a hashtable to aid with duplicate detection > (perhaps only once the pending-notify list gets long). > > Another thought is that it's already the case that duplicate detection is > something of a "best effort" activity; note for example the comment in > AsyncExistsPendingNotify pointing out that we don't collapse duplicates > across subtransactions. Would it be acceptable to relax the standards > a bit further? For example, if we only checked for duplicates among the > last N notification list entries (for N say around 100), we'd probably > cover just about all the useful cases, and the runtime would stay linear. > The data structure isn't tremendously conducive to that, but it could be > done. > > I like the hashtable idea if it can be made workable. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers