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 1uulBd-00GuGX-RX for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Sep 2025 05:10:06 +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 1uulBc-00CMbv-VG for pgsql-hackers@arkaria.postgresql.org; Sat, 06 Sep 2025 05:10:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uulBc-00CMbn-LV for pgsql-hackers@lists.postgresql.org; Sat, 06 Sep 2025 05:10:05 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uulBb-000nJc-0E for pgsql-hackers@lists.postgresql.org; Sat, 06 Sep 2025 05:10:04 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-55f7b6e4145so193408e87.1 for ; Fri, 05 Sep 2025 22:10:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757135400; x=1757740200; 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=a53sbp4pvro0q2sEakusHiohLGV2rxmNgsWqIbdMfVw=; b=kwDjWYz5KSJ/bSFf3wtnVHgO6Kh3P3huN1HfUI64IGyAcAxR8FNQy8frO1mb6BR9GG TdiHZgLBAt3khALCuPZx9/Nu3w3IDx4l52kuV8kiTjo3fcBqHXpRI7j8MbPEcuU5pWtT o9/VA776hrnCavfP7MBBxca5uPmXWQ/nvPXoHOWteCjp2VDKus+jrgDqNER3tYiOOjSP pQD9pmH+lK2xmwJb/anS2nHsXPsoh7RWWODCtnPTZpvJ4/d3YAsCGFCFKK9pkO2bg+SA B2j9JCl4HJxclSF+tEosq4BYFU04QIBjnoOIbe50gNq1PBETpM1IiyWH0l/2CkB8paa9 0NWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757135400; x=1757740200; 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=a53sbp4pvro0q2sEakusHiohLGV2rxmNgsWqIbdMfVw=; b=Csokbhqab7rMcCxm9S/jt/s9pBX7Qfq6ppRv9JrM/iDNHCwfEE2cXR7WAT/JQg6hqy lAT3FJbYN9ewQoxaABh2Xs08D6vCC5kfDhK/RHx++3YWGkSE6EIrFjUhgFY+RklgIvJO BwMQ/9LbJuEVja96HSjZT7sBqg1fXysRCKACi9oMPC6Ckl7BTmTr7ZK10pAnKck5E62K pzJk7eqXHN2O+TbnfwYmAxVKr4TDoISbuiLutebvYdfuDy9SO7RM8rhP5dSnKSSC0iyR HML5lckcMkqcOA/6Y51cFX2C0fPoBgyhlZ438423o8o3RTxc6C8Afi2Yz93OXh3zvOjz h01Q== X-Forwarded-Encrypted: i=1; AJvYcCW8q83liwXXEpND7qmpn23+g/qP1mCE1uddlPrfTvybY6dZdoHkJ45UASAzObx5IV/pL/Tq0OvVKZs8lfD8@lists.postgresql.org X-Gm-Message-State: AOJu0YxunlbAkaQ2gfQf6qIsVmVtgXYnCzBmNUWYgAFa/kCslG6QGmZp toedzpPg+GBZS7QvzMuuX7Ps84ZHzJu/dWNaOfcBQFB6TX2uTYEuh7Cl9A75xC9vUEqwl0nDPyE 8TlerIhEHQLyfekbbBFMkDPJxlD5j3xc= X-Gm-Gg: ASbGncvKfKRxIeZsu1anbXqYY+RXmiu5QZ4ZqQBqeHdUMkZC3R8/6ci0wGldsa7OvI2 cz/MJ44SA3eiFdeFaB42CzVt5nL5SiE2HQ6kFtZyccIW6k47FiTCp4JzbygKR8O5uD+0eKA+p4o jfUAAHN9ikN1/bhglrpWQrJ7iCVlLl/J2X91HX0v14JrVhMl/9OOZ6QqAdFwM6+RrgwRLW1j9di FbMeE8wjek7dS+uoNEl X-Google-Smtp-Source: AGHT+IGGHy3ZU29Ejvrj2HUcTvalBqUnb0Smx5LowpyGdUkbNGoy5rKSRFwXgLxLAF6Ttmc+0+j6hyzA7LVARFMknxk= X-Received: by 2002:a05:6512:158d:b0:55f:595f:9a3f with SMTP id 2adb3069b0e04-56261cbe16amr339717e87.15.1757135399840; Fri, 05 Sep 2025 22:09:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Sat, 6 Sep 2025 10:39:48 +0530 X-Gm-Features: Ac12FXx6IhcDb8cYIHs-vIr_mvIxPpVyoTJTCqeYpTk7NcBVDXyxzw61T186bog Message-ID: Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup To: Doruk Yilmaz Cc: "Hayato Kuroda (Fujitsu)" , pgsql-hackers@lists.postgresql.org 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 On Wed, Sep 3, 2025 at 6:13=E2=80=AFPM Doruk Yilmaz wro= te: > > Dear Hayato, > > > So, your python process establishes two connections, for publisher (rep= lication connection) > > and subscriber (normal connection). It receives changes from the publis= her, > > constructs SQL statements from the received results, and sends to subsc= riber's > > backend, is it right? > > Actually, it's a bit simpler than that - there are no two connections. > Our program reads changes from JSONL files rather than directly from a > publisher connection. > We have multiple Python processes, each with a single database > connection to the subscriber, > reading from these files and applying changes in parallel. > > > Is there a rule which attribute is clarified and others are not? > > For example, VOLATILE is specified on both side, STRICT is written only= in the > > system_functions.sql, and PARALLEL UNSAFE is set on pg_proc.dat. > > In pg_proc.dat, I believe the STRICT, IMMUTABLE, and PARALLEL SAFE are > the defaults (check out pg_proc.h). > So in pg_proc.dat, the ones that are specified are the ones that > aren't defaults, > there is provolatile =3D> 'v' (for VOLATILE) and proparallel =3D> 'u' (fo= r > UNSAFE), but no prostrict since it's already true by default. > In system_functions.sql, I went with being explicit about all the > attributes for clarity as it is the code declaration. > Then why didn't you specified PARALLEL UNSAFE as well? BTW, yesterday a new thread started with the same requirement [1]. It uses a slightly different way to define the new function. do you have any opinion on it? [1] - https://www.postgresql.org/message-id/CAE2gYzyTSNvHY1%2BiWUwykaLETSuA= ZsCWyryokjP6rG46ZvRgQA%40mail.gmail.com --=20 With Regards, Amit Kapila.