Re: [HACKERS] skip WAL on COPY patch

2011-08-24 Thread Robert Haas
On Tue, Aug 23, 2011 at 4:51 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mar ago 23 17:43:13 -0300 2011: On Tue, Aug 23, 2011 at 4:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: What I think would be really

[HACKERS] skip WAL on COPY patch

2011-08-23 Thread Steve Singer
The attached patch adds an option to the COPY command to skip writing WAL when the following conditions are all met: 1) The table is empty (zero size on disk) 2) The copy command can obtain an access exclusive lock on the table with out blocking. 3) The WAL isn't needed for replication For

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Tom Lane
Steve Singer ssin...@ca.afilias.info writes: The attached patch adds an option to the COPY command to skip writing WAL when the following conditions are all met: 1) The table is empty (zero size on disk) 2) The copy command can obtain an access exclusive lock on the table with out

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Robert Haas
On Tue, Aug 23, 2011 at 3:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: Steve Singer ssin...@ca.afilias.info writes: The attached patch adds an option to the COPY command to skip writing WAL when the following conditions are all met: 1) The table is empty (zero size on disk) 2) The copy command

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: What I think would be really interesting is a way to make this work when the table *isn't* empty. In other words, have a COPY option that (1) takes an exclusive lock on the table, (2) writes the data being inserted into new pages beyond the old EOF,

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mar ago 23 17:08:50 -0300 2011: What I think would be really interesting is a way to make this work when the table *isn't* empty. In other words, have a COPY option that (1) takes an exclusive lock on the table, (2) writes the data being inserted into

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Steve Singer
On 11-08-23 04:17 PM, Tom Lane wrote: Robert Haasrobertmh...@gmail.com writes: What I think would be really interesting is a way to make this work when the table *isn't* empty. In other words, have a COPY option that (1) takes an exclusive lock on the table, (2) writes the data being inserted

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Robert Haas
On Tue, Aug 23, 2011 at 4:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: What I think would be really interesting is a way to make this work when the table *isn't* empty.  In other words, have a COPY option that (1) takes an exclusive lock on the table, (2)

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mar ago 23 17:43:13 -0300 2011: On Tue, Aug 23, 2011 at 4:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: What I think would be really interesting is a way to make this work when the table *isn't* empty.  In other

Re: [HACKERS] skip WAL on COPY patch

2011-08-23 Thread Jeff Davis
On Tue, 2011-08-23 at 15:05 -0400, Tom Lane wrote: Steve Singer ssin...@ca.afilias.info writes: The attached patch adds an option to the COPY command to skip writing WAL when the following conditions are all met: 1) The table is empty (zero size on disk) 2) The copy command can obtain