Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1upRFi-0059il-F4 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Aug 2025 12:52:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1upRFh-005txb-T9 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Aug 2025 12:52:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1upRFh-005txT-IW for pgsql-hackers@lists.postgresql.org; Fri, 22 Aug 2025 12:52:18 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1upRFd-001H6Y-29 for pgsql-hackers@lists.postgresql.org; Fri, 22 Aug 2025 12:52:17 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-30cce5c7f1eso1681354fac.0 for ; Fri, 22 Aug 2025 05:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mixrank.com; s=googledamrudlacagu; t=1755867131; x=1756471931; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=F3nm2pycUKXvcCrmkykibjeGRetQLBUc6P/BUHqA15I=; b=o3LqxtgqNkbZAU6SvKVw/+lBuQKV4dgG/z4HQCsOFohAy8NVW39XJFQXObwSUxDZTN xKUykW8zOEeNjBfoJm2v5GOps1+y+dNQBuaGotlWZe5ax9GOGly+w3u/M88XlCDz78ID CsFSYZpshsXEEfbg9qPYXogWNDiy63uiyuNhHSTOa7w3nB0UYtYCY+GxArzL9Ibmz0Rq bE7bRp8E/3zY+Om9sS1E6PLs0LZ2YixAR8hW5hZa0Xp0XB/lA0Ou5Dv8BeuSat6Y3tLy GK+4UhM7ONDDf1nXHd0+wi8Ay+/7nSb/bpWxEKkumeyMOIC0b7rwhOI5wNPsHpUBvPgw K/Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755867131; x=1756471931; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F3nm2pycUKXvcCrmkykibjeGRetQLBUc6P/BUHqA15I=; b=r+gx3yklYq3Z0XR5uB+L0WfRw46fldnqf+NTt/LVUBiAUt6r4Ie4XFgiRV9RcnLDwL 5d6/Qnb/gfaR+us3B9XmJgW2FDdj7uvlRimwaGb3tExhfah3vWB1qkYPLxMRvlZ9kVJo 7xABj+mcOUHSqsAlDyQtoCnaLhHCOkFKX4V5G/HL1awRHfenwlR14rZqdEOOHgCbKt4g afCaivT45kavDzy7OEaGp8Zyuyw2ATa34uWzsED8cF+GbdpnRAUgL4b4yagL4ycu6zxX q7fDWCDzIADZ+ZlgShLWp3nrCwBwhqv6oZLgIrcON022//ON0Xb5noMNsNcGI4oL+Qpn ny3g== X-Gm-Message-State: AOJu0Yx5t2OWqPmLV79o3yT6qBipZFQSXt1j3PGVzbD6TsowLBksALtA d275rgzts0LzK3vzLUWEwfyH4LW+E2gzbEEDjQs0zEMYqJNIk1FVaKXvjE6s5fAvTXOHlv56VZv v/h9qrUJ72dn7oCBQY1MLKQexok5Q2gG9iqJ8T02wSg== X-Gm-Gg: ASbGncsoBnTNf6O6M3nB3b5LIexLQrnlesFBbbxqW7hwTCQmy/Mtneamckt4u1lOmhj 9nZ2VTO+XalDiNEImqRMJpJrcQ9Bp4nPAqOfbZBdDLBubNP7NO+60OL4OLzkvAFTcCf6hcIPc96 URJ0Y07eOAbP3SOejaRgliI4DMiEowwgiiyjtA4uamuve2JgcOKIj7xcMZnIzQ8UdopasP8zYW7 5umOZxiIVXij0EbsR9EFvdBIdRA79lzFDvoGGWM2Q== X-Google-Smtp-Source: AGHT+IEG+54o3L3tNvIE8nymixNNwOTDPmoTY703PuJYBKXEku3xbTCkzkX0rhqXL9Hd/XgkT6oqUwOYmLqyMtHBCvc= X-Received: by 2002:a05:6871:e299:b0:2ef:1c81:f2fd with SMTP id 586e51a60fabf-314c6fa3e97mr2548583fac.16.1755867131227; Fri, 22 Aug 2025 05:52:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Doruk Yilmaz Date: Fri, 22 Aug 2025 15:51:59 +0300 X-Gm-Features: Ac12FXwdAkakWYHUgRW-bxnav67BwT6vnIwQefPfuQ15Cl791nQxv-UW1TUfiDw Message-ID: Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup To: "Hayato Kuroda (Fujitsu)" Cc: pgsql-hackers@lists.postgresql.org, Amit Kapila Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dear Hayato, > Can you explain more why we must extend the SQL interface? In our system the workers aren't background workers and we don't ship a server-side extension; they're plain external processes (Python in our case) talking over standard database connections. In many deployments -especially managed Postgres- we can't load custom C code even if we wanted to. That's why we want to expose the existing pid knob via SQL: it lets ordinary client sessions participate in the same, already-implemented origin coordination without maintaining a fork or an extension. This patch doesn't invent a new capability, it just makes the internal behavior reachable from SQL. The new argument is optional and defaults to the current behavior, so nothing changes for existing users. It also keeps the feature usable from any language/runtime that coordinates parallel apply at the application layer. And I don't believe it is that dangerous or risky. The actual code we use in python is not that complex that I believe a person using replication already should be able to set it up. I don't understand why being able to achieve parallel replication is not accessible via SQL already. I am happy to do changes to the patch if you think there should be more guardrails. Thanks, Doruk Y=C4=B1lmaz