Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDzsh-0004uV-Tk for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2020 00:14:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDzsg-0007Mr-M8 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Mar 2020 00:14:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDzsg-0007Me-A2 for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2020 00:14:50 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jDzsd-0005SG-I6 for pgsql-hackers@lists.postgresql.org; Tue, 17 Mar 2020 00:14:49 +0000 Received: by mail-qk1-x742.google.com with SMTP id f3so29637620qkh.1 for ; Mon, 16 Mar 2020 17:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=cID3dnQjDS4aoeC4CAngxP8U66YcATXkRN6709RE8zk=; b=af40t6OBsjvuJLWbfIEVUkDC4G2ASvkVcf0j9TY7HCTGvIBu9bMGxp0gYe7x1+LicR +SRu2OTHU4c7RWoYfX2tb+38J2MTPCGImvUNPYCfbAKK40jrXyMnZY4oJ+ovzMuKloAX VWJAoZNnyrpzd96qqtalVbaCQLOU9ikWD5PifqRTzuh5AN+nFVcutOTQkJ02XoNGH16w ooTb8GQeS4R/8W5fQXtWliSOr7HwJiGjw9EG6pognVxFQpTIKLAijNTTQzFtPfR6ES/+ OQkCpsitNiArDhblvza1+HeaVbVAE1e4TvLioMAnphnrSWWcNTBzExihWp+dCRA0qNF1 EMww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=cID3dnQjDS4aoeC4CAngxP8U66YcATXkRN6709RE8zk=; b=gDNNXb3XO7RQWrlQuISllX0BAAGK7sjW+xNQHJjLmt/6OZKprTPvjYPnKAceuFIKGO /D0+Mw68g1yXPOKdYBpBYkGdkz3O7bVxYntUfBMl1HWaDuQF4Vl1p/2OanrpdsmAb3nZ 7EuhDkh3vuNto71Bxot6xXQQ/07UkISqVUSMtrPsqtdt6QRKdzpEaU2lE7cVvrIX2ASd dA07n4RylTseq8qdRs1XBCPcl5pivLg5fQPUwjMTohHKSz9Ji831m+v/w2Xjqmr47xTD 9tZsNFRbcFLz2kWoylIxpeEoyRV4YqcGslMET0v2Sz84u8x96d9hr0oplqIG56OU2hl+ zXtA== X-Gm-Message-State: ANhLgQ0hRDKuaAhNKFo2oJNEQOtNlehrTEofuO0E5F6uXgoUw8nUfFvf wPOVAiKYGnIJ4HbQb6y+Nz2vvA== X-Google-Smtp-Source: ADFU+vu+/4tTdjVqus87aOxWLjEgpim2qRLlH+LdAhVnGzYsyHGKWFOfnx6FCpmY+BD6MPjl11wA5w== X-Received: by 2002:a37:4d10:: with SMTP id a16mr2366737qkb.325.1584404086732; Mon, 16 Mar 2020 17:14:46 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([201.186.208.119]) by smtp.gmail.com with ESMTPSA id u51sm1101856qth.46.2020.03.16.17.14.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 17:14:46 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 768AF3006A7; Mon, 16 Mar 2020 21:14:36 -0300 (-03) Date: Mon, 16 Mar 2020 21:14:36 -0300 From: Alvaro Herrera To: Mark Dilger Cc: "pgsql-hackers@postgresql.org" , Kohei KaiGai , Adam Brightwell Subject: Re: Adding missing object access hook invocations Message-ID: <20200317001436.GA17904@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <435CD295-F409-44E0-91EC-DF32C7AFCD76@enterprisedb.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-16, Mark Dilger wrote: > Hackers, > > While working on object access hooks, I noticed several locations where I would expect the hook to be invoked, but no actual invocation. I think this just barely qualifies as a bug. It's debatable because whether it is a bug depends on the user's expectations and whether not invoking the hook in these cases is defensible. Does anybody have any recollection of an intentional choice not to invoke in these locations? Hmm, possibly the create-time calls are missing. I'm surprised about the InvokeObjectDropHook calls though. Doesn't deleteOneObject already call that? If we have more calls elsewhere, maybe they are redundant. I think we should only have those for "shared" objects. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services