Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjCoW-00049F-Qn for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Jul 2018 00:10:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fjCoT-0003B1-Mj for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Jul 2018 00:10:25 +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.89) (envelope-from ) id 1fjCoS-0003AT-Hh for pgsql-hackers@lists.postgresql.org; Sat, 28 Jul 2018 00:10:25 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fjCoP-0003xv-8H for pgsql-hackers@postgresql.org; Sat, 28 Jul 2018 00:10:23 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 25497589; Fri, 27 Jul 2018 20:10:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 27 Jul 2018 20:10:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=MtcmNaXcEewc2NH2/cnSmJZXh9GAUJF9ql1DzkXsF3I=; b=a1V7PqSZ yF9wchPmcTH8gLHQ/hk4V57S+ANmJvWvUEzBWrJjrXKJKItw+9wmwvj7CZI/P/4M d2yx9GuEGyz4wEsU83s8qsv5JwVIaY4/4KrYewgqIZXMlI8rpBS16xQ3ioWxijBr +1kaHM3NyAGE/Pa7lErbneXhTrTYgsM8IMpuLQv3FyMzcYWoPrxp4G1+omQHS8yd XCoQQm7hkeOKsqQC7xnYvaU6vQrKgbM5Fo0u8y1yf7QNfUU1PLYqKKqpDNGh59Kf wRkfU2bpXsi7FTflgbEYGKzfoAe0guSkKwVZHZ/nxnKMgHeHVWQLI2ohV1+yuO4w rDNW1o8g6SqJ6w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=MtcmNaXcEewc2NH2/cnSmJZXh9GAU JF9ql1DzkXsF3I=; b=qRvgfxxM17xQdxn2fE641SM4S7PcAqy91mqJqK536vCC8 thD4SSCwSqrvi1hHhzogZpuD5UT7upB5dkJPg5G7sSipp6p/7SEZYVkfk4b/Vh8v 6FMvDCxIBiOtHOzzzeeYBvO6sQTxLQ3mzEqeqWaK0EcR8LUlHqe9rU13UVG0MxSY 8y8aq43JpKmX4TsnMDXCSEKoB4OwpribOJQsnsigvOTo5+trM4yiibduB4Q9N8eV mes+jyVyHC5SO47gy7lEGL3mfKbbg6FBGDktR2yUWSq4CqrO4nGwahwAGj9+LABk lY8ndlv2UOP+IksViD7pv23ytXNms1stbKQDqn2bw== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 364F91025C; Fri, 27 Jul 2018 20:10:14 -0400 (EDT) Date: Sat, 28 Jul 2018 09:10:12 +0900 From: Michael Paquier To: "Bossart, Nathan" Cc: Kyotaro HORIGUCHI , "andres@anarazel.de" , "pgsql-hackers@lists.postgresql.org" , "robertmhaas@gmail.com" , "Schneider, Jeremy" , "pgsql-hackers@postgresql.org" , "lalbin@scharp.org" Subject: Re: BUG #15182: Canceling authentication due to timeout aka Denial of Service Attack Message-ID: <20180728001012.GC1882@paquier.xyz> References: <20180726204127.GA1754@paquier.xyz> <3D4F2733-92AE-4B74-8912-3C611B027721@amazon.com> <20180727023123.GE1754@paquier.xyz> <20180727.123702.77822416.horiguchi.kyotaro@lab.ntt.co.jp> <20180727041542.GH1754@paquier.xyz> <62728D88-85A0-4A9A-A4F8-67D96C1179E0@amazon.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QRj9sO5tAVLaXnSD" Content-Disposition: inline In-Reply-To: <62728D88-85A0-4A9A-A4F8-67D96C1179E0@amazon.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --QRj9sO5tAVLaXnSD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 27, 2018 at 02:40:42PM +0000, Bossart, Nathan wrote: > On 7/26/18, 11:16 PM, "Michael Paquier" wrote: > I think I'm essentially suggesting what you have in 0002 but without > the new RangeVarGetRelidExtended() callback. I've attached a modified > version of 0002 that seems to fix the originally reported issue. (I > haven't looked into any extra handling needed for ANALYZE or > partitioned tables.) Running the same checks for all VACUUMs would > keep things simple and provide a more uniform user experience. Okay, let me check that. Your patch has at least an error in get_all_vacuum_rels() where toast relations cannot be skipped. >> The docs mentioned that shared catalogs are processed, so I did not >> bother, but visibly your comment is that we could be more precise about >> the ownership in this case? An attempt is attached. >=20 > Sorry, I should have been clearer. But yes, your update is what I was > thinking. No problem. If there are no objections, I am going to fix the REINDEX issue first and back-patch. Its patch is the least invasive of the set. -- Michael --QRj9sO5tAVLaXnSD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAltbtGQACgkQnvQgOdby QH1tzg/+Kk1paePp13JOQ9ZLWHbKYUn8OBYJpQJYdhnb00x6nSoWrRxOarRaZ3cr IKqW2WbfUSIAUCwlh7+CYIHLqKgerQiyDZxwHbmr5hB8BN0t8bFTrbh9YfdtcR+g Oh0mTJaQSqRoMZziqpUurQQWF+AtZ3pG/sABkkRyDTtoMFEdg90Uhljbe1uc/3bY FCX8t7MH2gdzU2QVYWAKxvvJFu2geCRzRVXoP68wbU7I2A+x22aOYLqK2dR9XbSe ZGvCKeQ/eVQDMDHAxwq1aKwnl1BznUPDJwqyRkUOB4GdDIPytAYApSgK6m9wZoPH L+ff0Zeg27R95OKrWHsNxwBox45Q3HDS+9p2RyjG3lDOmwAL+ruiHRlDRdX9L1r7 WHpb9D+Xv2YVTut8Q0lgrxShdDEL/+yxLJhTxDY4dy17RATWxqGCRnJfQeJ0YZX8 xRuQM/UcCBtY6spHw5Zj+g/wY07FU6iO08qnQAQF4s928r4FC/JBhzYsRTwiWLHo KD6N76lj75A4hai3bPzy9J8l4aTrhrSM+A7f+5HsxAUOIlYc4ewAto/Fxr8eOv2G O6BVNj2/Vlm8nkjkQRfthvXtFTYw38n8BZCXLNvewCdQKfyGngKFG8pd2AY3y6B9 O/4NoV543ShPwEJI50R0UhKW6M9gOaMgFVZso2K1b5FkSaqav1M= =5nQc -----END PGP SIGNATURE----- --QRj9sO5tAVLaXnSD--