From: | Doruk Yilmaz <doruk(at)mixrank(dot)com> |
---|---|
To: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Subject: | Re: [Patch] add new parameter to pg_replication_origin_session_setup |
Date: | 2025-08-22 12:51:59 |
Message-ID: | CAMPB6wcOWBURHB1igRgCjD3geAemdoATfkKByMwrMM1TgMN64w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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ılmaz
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Reshke | 2025-08-22 13:17:01 | Re: Document How Commit Handles Aborted Transactions |
Previous Message | Mihail Nikalayeu | 2025-08-22 12:51:45 | Re: [BUG?] check_exclusion_or_unique_constraint false negative |