Re: A patch for get origin from commit_ts.

From: "movead(dot)li(at)highgo(dot)ca" <movead(dot)li(at)highgo(dot)ca>
To: michael <michael(at)paquier(dot)xyz>
Cc: petr <petr(at)2ndquadrant(dot)com>, simon <simon(at)2ndquadrant(dot)com>, "Madan Kumar" <madankumar1993(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, craig <craig(at)2ndquadrant(dot)com>, "Alvaro Herrera" <alvherre(at)2ndquadrant(dot)com>, andres <andres(at)anarazel(dot)de>, soumyadeep2007 <soumyadeep2007(at)gmail(dot)com>
Subject: Re: A patch for get origin from commit_ts.
Date: 2020-07-06 03:12:30
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>+SELECT pg_replication_origin_create('test_commit_ts: get_origin_1');
>+SELECT pg_replication_origin_create('test_commit_ts: get_origin_2');
>+SELECT pg_replication_origin_create('test_commit_ts: get_origin_3');
>Why do you need three replication origins to test three times the same
>pattern? Wouldn't one be enough and why don't you check after the
>timestamp? I would also two extra tests: one with a NULL input and an
>extra one where the data could not be found.
>+ found = TransactionIdGetCommitTsData(xid, &ts, &nodeid);
>+ if (!found)
>This part also looks incorrect to me, I think that you should still
>return two tuples, both marked as NULL. You can do that just by
>switching the nulls flags to true for the two values if nothing can be
Thanks for the points and follow them, new patch attached.

Highgo Software (Canada/China/Pakistan)
EMAIL: mailto:movead(dot)li(at)highgo(dot)ca

Attachment Content-Type Size
get_origin_from_commit_ts_v4.patch application/octet-stream 14.5 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2020-07-06 03:40:26 Re: Cleanup - adjust the code crossing 80-column window limit
Previous Message torikoshia 2020-07-06 03:12:18 Re: Creating a function for exposing memory usage of backend process