From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
---|---|
To: | 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Doruk Yilmaz <doruk(at)mixrank(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
Subject: | RE: [Patch] add new parameter to pg_replication_origin_session_setup |
Date: | 2025-09-18 07:37:11 |
Message-ID: | OSCPR01MB14966F65DE462D0A479B8ADD6F516A@OSCPR01MB14966.jpnprd01.prod.outlook.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dear hackers,
> I considered a test, please see attached files. 0001 was not changed from v6 and
> 0002 contained tests. Here, two sessions were opened and confirmed that they
> can
> set the same origin.
After considering and verifying more, it is more efficient to test via isolation
tester. Attached patchset does like that.
On my env, the duration became 10x faster because it does not start the instance
within the test.
In the test file, two sessions s0 and s1 are launched, they set the same session
origin. They insert local_lsn to a table and confirm latter insertion has larger
value.
One hacky point is to obtain pid for s0 from s1. Below contains my analysis.
application_name is controlled by the isolation_main.c and isolationtester.c.
When the isolation test works, initially isolation_main starts and launches
isolaiontester process, one per spec file.
In main.c, the application_name is set to "isolation/${testname}" at the starter
function. Then, after isolationtester parses the spec file, it appends given
name to each session. This is done at line 193.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
Attachment | Content-Type | Size |
---|---|---|
v8-0001-pg_replication_origin_session_setup-pid-parameter.patch | application/octet-stream | 5.9 KB |
v8-0002-add-test.patch | application/octet-stream | 6.3 KB |
v8-0003-Avoid-setting-ReplicationState-in-case-of-ERROR.patch | application/octet-stream | 4.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Chao Li | 2025-09-18 07:39:08 | Re: Make TID Scans recalculate the TIDs less often |
Previous Message | Yugo Nagata | 2025-09-18 07:20:17 | Re: Suggestion to add --continue-client-on-abort option to pgbench |