Re: WAL reader APIs and WAL segment open/close callbacks

2020-05-28 Thread Michael Paquier
On Tue, May 26, 2020 at 08:49:44AM +0900, Michael Paquier wrote: > NB: I found some incorrect comments as per the attached: > s/open_segment/segment_open/ > s/close_segment/segment_close/ And fixed this one with f93bb0c. -- Michael signature.asc Description: PGP signature

Re: WAL reader APIs and WAL segment open/close callbacks

2020-05-25 Thread Michael Paquier
On Mon, May 25, 2020 at 04:30:34PM -0400, Alvaro Herrera wrote: > The original code did things as you suggest: the open_segment callback > returned the FD, and the caller installed it in the struct. We then > changed it in commit 850196b610d2 to have the CB install the FD in the > struct directly.

Re: WAL reader APIs and WAL segment open/close callbacks

2020-05-25 Thread Alvaro Herrera
On 2020-May-25, Michael Paquier wrote: > I have been playing with the new APIs of xlogreader.h, and while > merging some of my stuff with 13, I found the handling around > ->seg.ws_file overcomplicated and confusing as it is necessary for a > plugin to manipulate directly the fd of an opened segme

Re: WAL reader APIs and WAL segment open/close callbacks

2020-05-24 Thread Kyotaro Horiguchi
At Mon, 25 May 2020 14:19:34 +0900, Michael Paquier wrote in > On Mon, May 25, 2020 at 11:17:06AM +0900, Kyotaro Horiguchi wrote: > > That depends on where we draw responsibility border, or who is > > responsible to the value of ws_file. I think that this API change was > > assuming the callbac

Re: WAL reader APIs and WAL segment open/close callbacks

2020-05-24 Thread Michael Paquier
On Mon, May 25, 2020 at 11:17:06AM +0900, Kyotaro Horiguchi wrote: > That depends on where we draw responsibility border, or who is > responsible to the value of ws_file. I think that this API change was > assuming the callbacks having full-knowledge of the xlogreader struct > and are responsible

Re: WAL reader APIs and WAL segment open/close callbacks

2020-05-24 Thread Kyotaro Horiguchi
At Mon, 25 May 2020 07:44:09 +0900, Michael Paquier wrote in > Hi all, > > I have been playing with the new APIs of xlogreader.h, and while > merging some of my stuff with 13, I found the handling around > ->seg.ws_file overcomplicated and confusing as it is necessary for a > plugin to manipula

WAL reader APIs and WAL segment open/close callbacks

2020-05-24 Thread Michael Paquier
Hi all, I have been playing with the new APIs of xlogreader.h, and while merging some of my stuff with 13, I found the handling around ->seg.ws_file overcomplicated and confusing as it is necessary for a plugin to manipulate directly the fd of an opened segment in the WAL segment open/close callba