RE: [Patch] add new parameter to pg_replication_origin_session_setup
От | Hayato Kuroda (Fujitsu) |
---|---|
Тема | RE: [Patch] add new parameter to pg_replication_origin_session_setup |
Дата | |
Msg-id | OSCPR01MB14966BF4CA9B767C259DBD9CDF53EA@OSCPR01MB14966.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: [Patch] add new parameter to pg_replication_origin_session_setup (Doruk Yilmaz <doruk@mixrank.com>) |
Список | pgsql-hackers |
Dear Doruk, > 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. So, your python process establishes two connections, for publisher (replication connection) and subscriber (normal connection). It receives changes from the publisher, constructs SQL statements from the received results, and sends to subscriber's backend, is it right? I'm not sure it is the common approach, but I see your point that you cannot install your extensions on managed postgres. Anyway, I still feel bit dangerous but OK if others can accept. Regarding the patch, I want to ask one point. ``` +CREATE OR REPLACE FUNCTION + pg_replication_origin_session_setup(node_name text, pid integer DEFAULT 0) +RETURNS void +LANGUAGE INTERNAL +STRICT VOLATILE +AS 'pg_replication_origin_session_setup'; ... { oid => '6006', descr => 'configure session to maintain replication progress tracking for the passed in origin', proname => 'pg_replication_origin_session_setup', provolatile => 'v', - proparallel => 'u', prorettype => 'void', proargtypes => 'text', + proparallel => 'u', prorettype => 'void', proargtypes => 'text int4', prosrc => 'pg_replication_origin_session_setup' }, ``` 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. Best regards, Hayato Kuroda FUJITSU LIMITED
В списке pgsql-hackers по дате отправления: