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 1lJwWL-0001B1-7b for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Mar 2021 10:56:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJwVn-0004ku-Ue for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Mar 2021 10:56:19 +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 1lJwVn-0004km-J5 for pgsql-hackers@lists.postgresql.org; Wed, 10 Mar 2021 10:56:19 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lJwVk-0004N3-G3 for pgsql-hackers@postgresql.org; Wed, 10 Mar 2021 10:56:18 +0000 Received: by mail-wm1-x329.google.com with SMTP id e23so6813239wmh.3 for ; Wed, 10 Mar 2021 02:56:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=45PG/U+FsxNC1xJnlPEzS91JvJc7SbHpSUieTK2Jccc=; b=M3UWAYHvk/rIA/Q7Iz3JNljCx3BUKr7XrdSCca9uDuvVA8P4YakRRgV941U6aseGBQ HYuwbUpz2IdVDnyCHpr9G2Cpx/kGJfr33f9EOTgBNEkVhq7o0h6qg8NdIfjaSMWuDAi6 0QHsuN0BL5Vaux6HnSWDs1hNOxFBU6STdTRbArvk+bfX7VXe0FhYyyJ+n6a98JZ0Tw09 v2B1VqdkCkE0562KIlm8KnmlFHI9fJY7OcDVjNXFBmNAJYS9nclPQFbQpZTqPYGllWOi zmM1hTuVp/MPJ8o7U+zF3NoR3mLjLnKr/ai9NqH3ePVrlaV9L9x4+k8/pVXFFMCDOr86 9JwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=45PG/U+FsxNC1xJnlPEzS91JvJc7SbHpSUieTK2Jccc=; b=qGv3EZ/KzC20ISg6QAobcJ82/NY++0qnxBz/pFDZLo3lyYVxrF0L8SWrnDh/aaEuzF EbO9WZyho2h7sjFwaO1AMR6tCZluoFZJsMTPdE6D4OutL/i3myFNHI9plv5oA/TB5wt/ ow+UR8lFXEgpialLAb8VWpFrR+54Z77TFdUiyamBmvXdfclTtlh5Q9aBUFuySRYGqsfP U1fs7TOecqctNkl/1n8C9l6d4tKBaQVCEVbgAPkS4S7PualkFWDiOmXJkvHsOlZYuIwC ACs7CpuD2abE03lH6HJZbi5BheNvA6Te1J7in5R5H1zCiovldGyLuDNxQjdqtF9PhSnj B85A== X-Gm-Message-State: AOAM533dnwLXpKNCSkYG+heU5tsnOyKq2MfqefWu7JuRoTyrv8xPLyum HiVOqnyT0rF0svpqTcFR1hkqTw7Yl0AgStTl/O828dv5B41VwjpYGcBY5/j6aAvGXEJdmI1TG+U ZRHIRhBpDiW+1vhf0UcPYtaf21r0ShnKusbZuANrzMLUYjBlQLd9dhsoBEjYSQIkyrYzaIECpeS bcjghsYUSeGiCE0nZ4XDFxgAwgrG6H5VjFaVwb X-Google-Smtp-Source: ABdhPJwm8A0TV/lp0EoXOVKhLeUJon6Y41L5Xwo+xj5vWHgDkSrctmd30EJoJ+cLzh9j8AuXboP/Tg== X-Received: by 2002:a7b:ce16:: with SMTP id m22mr2789549wmc.65.1615373774088; Wed, 10 Mar 2021 02:56:14 -0800 (PST) Received: from [10.80.10.41] ([185.110.89.141]) by smtp.gmail.com with ESMTPSA id m3sm8612494wmc.48.2021.03.10.02.56.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Mar 2021 02:56:13 -0800 (PST) Subject: Re: [PATCH] Provide more information to filter_prepare To: Amit Kapila Cc: "pgsql-hackers@postgresql.org" , Ajin Cherian References: From: Markus Wanner Message-ID: Date: Wed, 10 Mar 2021 11:56:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10.03.21 11:18, Amit Kapila wrote: > On Tue, Mar 9, 2021 at 2:14 PM Markus Wanner > wrote: >> currently, only the gid is passed on to the filter_prepare callback. >> While we probably should not pass a full ReorderBufferTXN (as we do for >> most other output plugin callbacks), a bit more information would be >> nice, I think. > > How the proposed 'xid' parameter can be useful? What exactly plugins > want to do with it? The xid is the very basic identifier for transactions in Postgres. Any output plugin that interacts with Postgres in any way slightly more interesting than "filter by gid prefix" is very likely to come across a TransactionId. It allows for basics like checking if the transaction to decode still is in progress, for example. Or in a much more complex scenario, decide on whether or not to filter based on properties the extension stored during processing the transaction. Regards Markus