Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oh27n-0004ai-Dz for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Oct 2022 05:11:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oh27m-0003Gv-3s for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Oct 2022 05:11:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oh27l-0003Gl-Qs for pgsql-hackers@lists.postgresql.org; Sat, 08 Oct 2022 05:11:45 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oh27j-00079M-SR for pgsql-hackers@postgresql.org; Sat, 08 Oct 2022 05:11:45 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CC3C05C009B; Sat, 8 Oct 2022 01:11:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 08 Oct 2022 01:11:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1665205902; x=1665292302; bh=pRVdMVxMFC Iz4WkKfc/RpdivmlRANI/+FjgwGDIpgAM=; b=VxYXbsGuKCPNwmRchz827MD9tC f6uTXoOCYc6QoMAspMMwFc4lGb/nFRxrISAA7U6z7lDQ0P+irC8Uf1xJQrcDRiUn YxKEDBXb1jYH4NZdaPreha9YzSXtvkL2MyaHhYYLO5jfwQpixxQoxE19NHyz6qqy /K8ytve90QNGMYuyaid3KqEMwzza8fpsjTq3RlLUBWcPhkMJEsRLhK2QVKt0Z5HK g0ArV+stz0WpRuY9GHB6i+3jpr8LwG0wfQIiri+gFfTEU/RoBECcgzGun9FAMlTs mtBmRfeL8J1G6vYWYbJfZfOQbh/iu3zfz/xW0WtcdRieqzM9Bqzku4bHL7lQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1665205902; x=1665292302; bh=pRVdMVxMFCIz4WkKfc/RpdivmlRA NI/+FjgwGDIpgAM=; b=mMuMHgq03ikcKljZ4CAuMEHD5XjH4+9xfLmQXd9jJI3S A/kGrPLENRZx26892jTlzeZYDWYVWgE9rlWORjyg+KQMFYIU/N6UW6nM+MmxrcqQ wHpcllaVynw3Vr88Qf2WN1xpQ+udAd+vGP1FZ4x5E+XOkbYOwkhCUW2oKy2Yyf+Y I65gu15kiKuIj0k2bq8Vxuzjr6a2raUzQ8BXCy/dEjHVpErknz+aOqvoPajhHWZf c7bImpbo4XUA5kPHONiJRfSIjd6Zfw9/KIDmp5hqjR4AGeSlASDFpC2MVs6TTb+T tCYvm7+4dbCC4sLWCE3uQfN6PZywozD0jHLnV8+AFQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeeikedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Oct 2022 01:11:41 -0400 (EDT) Date: Sat, 8 Oct 2022 14:11:38 +0900 From: Michael Paquier To: Nathan Bossart Cc: Soumyadeep Chakraborty , "Sanaba, Bilva" , "pgsql-hackers@postgresql.org" Subject: Re: Adding Support for Copy callback functionality on COPY TO api Message-ID: References: <253C21D1-FCEB-41D9-A2AF-E6517015B7D7@amazon.com> <20200930074151.GR1996@paquier.xyz> <20220802234919.GA841243@nathanxps13> <20221007214824.GA814385@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0YGuBCVoRJL3vAoa" Content-Disposition: inline In-Reply-To: <20221007214824.GA814385@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0YGuBCVoRJL3vAoa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 07, 2022 at 02:48:24PM -0700, Nathan Bossart wrote: > Here is an attempt at adding such a test module. Using an ereport(NOTICE) to show the data reported in the callback is fine by me. How about making the module a bit more modular, by passing as argument a regclass and building a list of arguments with it? You may want to hold the ShareAccessLock on the relation until the end of the transaction in this example. -- Michael --0YGuBCVoRJL3vAoa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmNBBooACgkQnvQgOdby QH1EKA//UUqCntD77FuNXqHCOj0mKSRQlpM36lsnzfYKhaPRMZyT8zkxUtXDai0Q mfrVJ5//y5DELL5qwgWyRI1OTyWq02KDM+8gKvES5XsZl7PTH2xaazOk2TEp13Be oRYeaIc19mkXnBEOMr3BAQ9y1XaWMj96aevVdWypwdOsH0CtK2DeryAGgt81C/f0 mjpeg/1p+SYrGOHKlViUXTEAsUQTa0lfOid3YxoC5jOcXdB0zJrvE4PfOr5HOHNc SHhKhwH5/SKuyu0FZQdj2C6YJo7pFND7kIB6RS71TOMxlk9Rth/8WtJVxxlJqn+V sNT++TUciUL8/pQaOgdfavc6m/AK+wXEiufmL15PO5MG68ffrpGdx2WakZAXdc1f 905rBoY2MvClI8cHVA1f9+4BzeLPCeIlXWYVhXZOuJIfTjwoQrVLbBPwWSQrNycR /x2rN/1OMc0p1D6luJX1IJTGi1CaF345cKBkZW+OiOzQ/bLkbcid4P3Z0dn5lIWl 5w5ixAdmJGGpXaLoGNYVyG48yqVccA+7j4yCOoVRNc7t0jhaCPAGl3XnQ5ZJJW8v 7QoX/sRiGAE5k8jHosSQhFP5quzaCuj1mo5g7CY81h+5oSYPs9GF9AslQ6zIXsPS DmnBVVesKcwW7tghuc12tCLjWEKMG6fQ+JUZaGgpRXr8+9pyAHY= =5otZ -----END PGP SIGNATURE----- --0YGuBCVoRJL3vAoa--