Re: [HACKERS] COPY and heap_sync

2014-09-03 Thread Robert Haas
On Sat, Aug 30, 2014 at 2:26 AM, Jeff Janes wrote: > If you insert tuples with COPY into a table created or truncated in the same > transaction, at the end of the COPY it calls heap_sync. > > But there cases were people use COPY in a loop with a small amount of data > in each statement. Now it is

Re: [HACKERS] COPY and heap_sync

2014-09-02 Thread Jeff Janes
On Sun, Aug 31, 2014 at 6:10 AM, Peter Eisentraut wrote: > On 8/30/14 2:26 AM, Jeff Janes wrote: > > But there cases were people use COPY in a loop with a small amount of > > data in each statement. > > What would be the reason for doing that? > > As far as I can tell, DRY. They need code to do

Re: [HACKERS] COPY and heap_sync

2014-08-31 Thread Fabrízio de Royes Mello
On Sun, Aug 31, 2014 at 10:10 AM, Peter Eisentraut wrote: > > On 8/30/14 2:26 AM, Jeff Janes wrote: > > But there cases were people use COPY in a loop with a small amount of > > data in each statement. > > What would be the reason for doing that? > I used that to the same thing many times. In a c

Re: [HACKERS] COPY and heap_sync

2014-08-31 Thread Peter Eisentraut
On 8/30/14 2:26 AM, Jeff Janes wrote: > But there cases were people use COPY in a loop with a small amount of > data in each statement. What would be the reason for doing that? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://ww

Re: [HACKERS] COPY and heap_sync

2014-08-30 Thread Fabrízio de Royes Mello
On Sat, Aug 30, 2014 at 5:05 AM, Atri Sharma wrote: > > > On Saturday, August 30, 2014, Amit Kapila wrote: >> >> On Sat, Aug 30, 2014 at 11:56 AM, Jeff Janes wrote: >> > >> > If you insert tuples with COPY into a table created or truncated in the same transaction, at the end of the COPY it calls

Re: [HACKERS] COPY and heap_sync

2014-08-30 Thread Atri Sharma
On Saturday, August 30, 2014, Amit Kapila wrote: > On Sat, Aug 30, 2014 at 11:56 AM, Jeff Janes > wrote: > > > > If you insert tuples with COPY into a table created or truncated in the > same transaction, at the end of the COPY it calls heap_sync. > > > > But there cases were people use COPY in

Re: [HACKERS] COPY and heap_sync

2014-08-30 Thread Amit Kapila
On Sat, Aug 30, 2014 at 11:56 AM, Jeff Janes wrote: > > If you insert tuples with COPY into a table created or truncated in the same transaction, at the end of the COPY it calls heap_sync. > > But there cases were people use COPY in a loop with a small amount of data in each statement. Now it is

[HACKERS] COPY and heap_sync

2014-08-29 Thread Jeff Janes
If you insert tuples with COPY into a table created or truncated in the same transaction, at the end of the COPY it calls heap_sync. But there cases were people use COPY in a loop with a small amount of data in each statement. Now it is calling heap_sync many times, and if NBuffers is large doing