Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-17 Thread Ashutosh Sharma
On Sat, May 18, 2019 at 6:44 AM David Rowley wrote: > On Sat, 18 May 2019 at 12:49, Andres Freund wrote: > > > > On 2019-05-18 06:14:15 +0530, Ashutosh Sharma wrote: > > > I actually feel that the function name itself is not correct here, it > > > appears to be confusing and inconsistent conside

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-17 Thread Tom Lane
David Rowley writes: > On Sat, 18 May 2019 at 12:49, Andres Freund wrote: >> Unless somebody else presses back hard against doing so *soon*, I'm >> going to close this open issue. I don't think it's worth spending >> further time arguing about a few characters. > I'd say if we're not going to bo

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-17 Thread David Rowley
On Sat, 18 May 2019 at 12:49, Andres Freund wrote: > > On 2019-05-18 06:14:15 +0530, Ashutosh Sharma wrote: > > I actually feel that the function name itself is not correct here, it > > appears to be confusing and inconsistent considering the kind of work that > > it is doing. I think, the functio

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-17 Thread Andres Freund
Hi, On 2019-05-18 06:14:15 +0530, Ashutosh Sharma wrote: > On Sat, May 18, 2019 at 1:34 AM Andres Freund wrote: > Considering that we can have MAX_BUFFERED_TUPLES slots in each multi-insert > buffer and we do flush the buffer after MAX_BUFFERED_TUPLES tuples have > been stored, it seems unlikely

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-17 Thread Ashutosh Sharma
On Sat, May 18, 2019 at 1:34 AM Andres Freund wrote: > On 2019-05-17 11:09:41 +0530, Ashutosh Sharma wrote: > > On Fri, May 17, 2019 at 3:10 AM Alvaro Herrera > > > wrote: > > > > > On 2019-May-14, Michael Paquier wrote: > > > > > > > On Tue, May 14, 2019 at 01:19:30PM +1200, David Rowley wrote:

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-17 Thread Andres Freund
On 2019-05-17 11:09:41 +0530, Ashutosh Sharma wrote: > On Fri, May 17, 2019 at 3:10 AM Alvaro Herrera > wrote: > > > On 2019-May-14, Michael Paquier wrote: > > > > > On Tue, May 14, 2019 at 01:19:30PM +1200, David Rowley wrote: > > > > When I wrote the code I admit that I was probably wearing my

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-16 Thread Ashutosh Sharma
On Fri, May 17, 2019 at 3:10 AM Alvaro Herrera wrote: > On 2019-May-14, Michael Paquier wrote: > > > On Tue, May 14, 2019 at 01:19:30PM +1200, David Rowley wrote: > > > When I wrote the code I admit that I was probably wearing my > > > object-orientated programming hat. I had in mind that the who

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-16 Thread Alvaro Herrera
On 2019-May-14, Michael Paquier wrote: > On Tue, May 14, 2019 at 01:19:30PM +1200, David Rowley wrote: > > When I wrote the code I admit that I was probably wearing my > > object-orientated programming hat. I had in mind that the whole > > function series would have made a good class. Passing the

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-13 Thread Michael Paquier
On Tue, May 14, 2019 at 01:19:30PM +1200, David Rowley wrote: > When I wrote the code I admit that I was probably wearing my > object-orientated programming hat. I had in mind that the whole > function series would have made a good class. Passing the > CopyMultiInsertInfo was sort of the non-OOP e

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-13 Thread David Rowley
On Tue, 14 May 2019 at 13:00, Michael Paquier wrote: > > On Mon, May 13, 2019 at 08:17:49PM +0530, Ashutosh Sharma wrote: > > Thanks for the confirmation David. The patch looks good to me. > > It looks to me that it can be a matter a consistency with the other > APIs dealing with multi-inserts in

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-13 Thread Michael Paquier
On Mon, May 13, 2019 at 08:17:49PM +0530, Ashutosh Sharma wrote: > Thanks for the confirmation David. The patch looks good to me. It looks to me that it can be a matter a consistency with the other APIs dealing with multi-inserts in COPY. For now I have added an open item on that. -- Michael si

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-13 Thread Ashutosh Sharma
On Mon, May 13, 2019 at 7:16 PM David Rowley wrote: > On Mon, 13 May 2019 at 23:20, Ashutosh Sharma > wrote: > > In the latest PostgreSQL code, I could see that we are passing > CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot() although > it is not being used anywhere in that fu

Re: Passing CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot()

2019-05-13 Thread David Rowley
On Mon, 13 May 2019 at 23:20, Ashutosh Sharma wrote: > In the latest PostgreSQL code, I could see that we are passing > CopyMultiInsertInfo structure to CopyMultiInsertInfoNextFreeSlot() although > it is not being used anywhere in that function. Could you please let me know > if it has been don