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 1fiuAm-0006OX-8l for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jul 2018 04:16:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fiuAj-0006K6-31 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jul 2018 04:16:09 +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 1fiuAi-0006Jz-24 for pgsql-hackers@lists.postgresql.org; Fri, 27 Jul 2018 04:16:08 +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 1fiuAa-00032E-70 for pgsql-hackers@postgresql.org; Fri, 27 Jul 2018 04:16:06 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id CF5D82C0; Fri, 27 Jul 2018 00:15:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 27 Jul 2018 00:15:58 -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=vddpELL2fwwlmCur9NscnhKGVHtsVxTaGKCrD2yDpRQ=; b=lLvCf+N+ z9vlGIDbprqUVoDSCOcf9sgi1C/7vk6Yt3S4+SKuMWtIHlLMu+f9/ZUIIhIOxTLz Kt0ed/HrCn/FA1ITERLWJEkmhkfbTacguIyg1R2cEUQxQ9/9AmMCdJ+IuJU6BQg9 Cd3NhxuKQMhAkFEAlJfUZRcTuGSUyyI7nxE4fXEfH+5Y3zR6CJKThN9kpaYEcO7T iiwNqamzkHP4kYKyZjhTAF9oLs/bXi6gYm41clnsWih+P3Uq90Zs1W+DiFv61DP2 N1Er/RLlHmyA2U/3nkKN6iV2VKUN9nsiQSfTsCS1AmTdeI79K1Vhw+OWBiM3LH4h fUHEutCNGouzQA== 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=vddpELL2fwwlmCur9NscnhKGVHtsV xTaGKCrD2yDpRQ=; b=PFwqM5viq6YjHd7Uw54rTFiHr+0ej4QH12fhC0k1BSLzz LVDKMT7fha+9U1X7AoMXCAA2vA7S8kHN7eDzTiK6/xazefwI6oJLuuC/1f4TzlSo FC37ks5PcKUmkJJNZAdT/ezfWJZZ2Us7M+68lxGXeCiymPLIcLr0Chwvz9P+o5LN 8VYp8+ZyBPkcoA6iroruhZf1UKcDNzSTw5W/J5oD7KOmnowcsSnAtftkeOHW8pyF AsmGCrtgkT5hSGOE+LHrXnumbgN23APe2eT54vumrVfcRlN/lY50NE/eNv/keq7s JOMoF2jPPihqKZInazPwtL0V2akEV+OGU2d1fgkZQ== X-ME-Proxy: X-ME-Sender: Received: from paquier.xyz (mp76f1fb08.ap.nuro.jp [118.241.251.8]) by mail.messagingengine.com (Postfix) with ESMTPA id AB349E454E; Fri, 27 Jul 2018 00:15:53 -0400 (EDT) Date: Fri, 27 Jul 2018 13:15:42 +0900 From: Michael Paquier To: Kyotaro HORIGUCHI Cc: bossartn@amazon.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, robertmhaas@gmail.com, schnjere@amazon.com, pgsql-hackers@postgresql.org, lalbin@scharp.org Subject: Re: BUG #15182: Canceling authentication due to timeout aka Denial of Service Attack Message-ID: <20180727041542.GH1754@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cf0hFtnykp6aONGL" Content-Disposition: inline In-Reply-To: <20180727.123702.77822416.horiguchi.kyotaro@lab.ntt.co.jp> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --cf0hFtnykp6aONGL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 27, 2018 at 12:37:02PM +0900, Kyotaro HORIGUCHI wrote: > I intended the same as Bossart said. It is not reasonable that > VACUUM and VACUUM FULL behaves differently on rejection for the > same reason. The objective of the first (or early) check is > rejecting (non-superuser's) unprivileged VACUUM FULL. Any > possible modifications on a syscache tuple before taking a lock > doesn't seem to harm in the point of view. Anyway the lock > acquired in expand_vacuum_rel is not held until vacuum_rel. Thinking about it harder, it is possible to pass down a status pointer that the callback of RangeVarGetRelidExtended could fill if we pass it down using the argument list. This would need special handling for the case where expand_vacuum_rel() is NIL but that would be workable. If vacuum_check_rel() does not need to work with elevel >=3D ERROR, then the set of log messages remains the same. > Apart from the discussion above, it is uneasy for me that the > messages seem heavily affected by the callers context. Sure, the patch for vacuum is still heavily WIP. I am not much happy about that either. >> Regarding those patches, I am pretty happy how things turn out for >> TRUNCATE and REINDEX, way less for VACUUM, so getting 0001 and 0003 >> committed first makes the most sense to me as their logic is rather >> straight-forward (well way of speaking ;p ). >=20 > About 0001, I'm not sure what the "session-level" means but it > looks fine and works as expected. 0003 looks fine overall. What I mean here is checking the interactions with other backends, truncate_check_session is the best name I could come up with. truncate_check_activity was another. I am not attached to a single name, if you have an ideaof course please feel free. > I think I heard that gender-free wording is appreciated but it > might be only about documentation. Sure. -- Michael --cf0hFtnykp6aONGL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAltanG4ACgkQnvQgOdby QH24YxAAh6HHX5GWitzQtHTxUmyzW4yztxrEhqKRfvyK7bFAjsGsAM/c+4mcQM7l wZkDYTZMyOZEU/hWoejYVoxD+3bOWbvE02lDiEECdj1GVzkkCg4w+PP2amFCD3+0 F+r5P4Tog66HXuvUgU+C7DSKMsApCJMszMtZ8tiqsbOg8EebtL1DTqDGXF0lYUbl rWK6RE3AorIzJpkwIR6IllV0NM4bMePg4ocXeH1WBQ4AT0/7WK0klAX3UWGF4ONr +thzAwpyGVD7yR/pjMzj2EriYBvOG8nstqoH8xN0bhlwmtUMXxhLewek9jkVwtVG OlgIIV7/3mY+GNtABXtCg+BzwKgMnyjr0CucOScxlK/9eGUzrGV0eQm7NSjszZfP BcjGc4Fg3oRMuNlp8CLn3QNtCoqCjCL45QgaNY37uNmT3mq9WcoZgn//9mDLYhBa 9nbFla9Kxh/OMgVIpTpHhGzqsm+dyamqc0KPCT95nZjYQCgC9s6MFIxncoGgncjz zv8wzrRAmBme3ON8FDF5ao6qrGqGURwONTGTrh62y5SsnRRngo5IzPV4wmvaSJ4q B1iaDyDf0O9ENYPUpljK3mMcpqRz+BWn8Um3LnnNdfwIJv5Imh7JdWfD2NdWeXRv 2zexmUEI3BgcBz7EeJRplfUqyhOi9Nlr8Gc3qOP8dV3IMt8c/SE= =S8HQ -----END PGP SIGNATURE----- --cf0hFtnykp6aONGL--