Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF8x1-0002bM-I0 for pgsql-committers@arkaria.postgresql.org; Thu, 16 Nov 2017 01:26:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eF8x0-00011O-OK for pgsql-committers@arkaria.postgresql.org; Thu, 16 Nov 2017 01:26:42 +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_2) (envelope-from ) id 1eF8x0-00011E-Cn for pgsql-committers@lists.postgresql.org; Thu, 16 Nov 2017 01:26:42 +0000 Received: from mail-yw0-x233.google.com ([2607:f8b0:4002:c05::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eF8ww-0007d9-SB for pgsql-committers@postgresql.org; Thu, 16 Nov 2017 01:26:40 +0000 Received: by mail-yw0-x233.google.com with SMTP id q37so4363393ywa.12 for ; Wed, 15 Nov 2017 17:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=v+mN5zLu+IobbB4oo3WXbX3gR89PnAcNVze3K/7+rW8=; b=xifD6yxPv29pHhEzGN1PB4uVWx57Uqw/7xkglm6U+otvxDkSr5G0NGRIDWxpPZnATe GNS3WjNtWtpSCkozYl0gDdffRGgi+aJuXaYAusqeJ2aOXbFwoGwLJBfhj9+2UdtbKzUe xwYcnor1gBTONIfvODlI+/TerdvCuveijeAXpVR/mj9p/myX5/Z4DR7N3jNLYMGgAPUD gjrKcNmLwNKqXFeIoYgrnKu30uHM+uj2hK5BX1WkzidGOWK5prqkVfuzYOAOTyVbzNqG GHiFlGyqEuDRC/R7+p5kw2R7SH8jwtjvl33EfByuASI0O2uTLwpAb8PIvlt30EDxBiUE NBzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=v+mN5zLu+IobbB4oo3WXbX3gR89PnAcNVze3K/7+rW8=; b=FNU1JXbFW+CqxL19bWBi111psmTUClbSnj/Y9JKN6hgAwyQLGlepYmK7B0tuAyn+M/ 9UBjWlxkBJ0C/g+vkeeUXGXyrVb6qXPuQzjZ70pNk1BZIJDK6cUMTWS/tiY/y44OUjkL QXx2YkCPMepZXaD89KDq9elBk3OtNm9O35DDmidxiBzXNtJAOZOGetbxuCa1qX8sTegv S9i7VPiNXBAFAK85qrefQKVcSf6ea5yAfucdYAWQRF8noleEgu84sBFggG22AZrNk6J9 ucv9GrWdwpAzMANxZe5KmnSPjkQH/KymEphEWHcwZkZrvByplIoOOaXSn4MRaOtoMc1/ cavw== X-Gm-Message-State: AJaThX79r2OWlcChSOvWACqovf3Nf2hIyrXLHd1x8p/m6wSBezeRza6o MykSqJtfSAfTyX2iW3ln2PEaF17gqbdAoTp3nCBSzPcFGdX5M+xNvSzpwxRhjdEWlNTCj1rZIGw Qwl8D/4xiUQiRCpWuwJWCbn3iYMTu/aQaMe8f+5UCKLaPieGSJo/mQvcXGea1LC2YIXsxF5SsLQ 42ilpts+5db5pJpVaW X-Google-Smtp-Source: AGs4zMbxC/dZEMvCFl5yobTwdA2tEXc+Sg/kFSwf0IUH4Df63Ah9OM3erFYPcwZWmzME36tVhZotnA== X-Received: by 10.13.246.197 with SMTP id g188mr3066ywf.308.1510795596793; Wed, 15 Nov 2017 17:26:36 -0800 (PST) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id f64sm10227206ywh.76.2017.11.15.17.26.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Nov 2017 17:26:36 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Add hooks for session start and session end To: Michael Paquier Cc: Tom Lane , pgsql-committers@postgresql.org References: <10176.1510764611@sss.pgh.pa.us> <575d6fa2-78d0-4456-8600-302fc35b2591@dunslane.net> <21509.1510772165@sss.pgh.pa.us> <762a0864-a831-1009-c2c7-297695d1e3e4@2ndQuadrant.com> <6a231271-671f-a5b0-e4ba-a0ae57ba50cd@2ndQuadrant.com> <5681.1510781444@sss.pgh.pa.us> <74fc9ffd-ded3-6139-dd51-440fc15fb1ac@2ndQuadrant.com> Message-ID: Date: Wed, 15 Nov 2017 20:26:35 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/15/2017 05:07 PM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 6:53 AM, Andrew Dunstan > wrote: >> On 11/15/2017 04:30 PM, Tom Lane wrote: >>> Andrew Dunstan writes: >>>> On 11/15/2017 02:17 PM, Andrew Dunstan wrote: >>>>> Yeah, that was my first instinct. But then how do the test_rls_hooks >>>>> tests succeed? They too have a shared_preload_library. >>>> Aha, it does >>>> LOAD 'test_rls_hooks'; >>>> at the start of its script. Of course we can't do that here. >>>> Not sure what the best way to resolve this is. For now I'm inclined just >>>> to override the installcheck target in the module's makefile and disable >>>> it in vcregress.pl. >>> Yeah. >>> >>>> Maybe we need to shift from installcheck to check mode for these >>>> modules. That would involve a buildfarm script change. >>> Seems like expending an awful lot of cycles in support of a rather trivial >>> feature. >> Possibly. At any rate I'm not going to do it immediately. > So why not just nuking it from the core code? The test module is > basically dead code now, and has been useful during review to check > that the positions of the hooks are adapted to run SQL queries at > session start and end. I don't mind to include it in my own set of > plugins on github instead. It's not dead at all. "make check" works just fine. It would be possible to create a trivial buildfarm module to run that if we wanted to. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services