Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 850FC55C5A5 for ; Mon, 16 Jul 2012 13:36:49 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SqoHv-0003qx-AD for pgsql-hackers@postgresql.org; Mon, 16 Jul 2012 16:36:49 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q6GGaWhl011953; Mon, 16 Jul 2012 12:36:32 -0400 (EDT) From: Tom Lane To: Robert Haas cc: Jeff Janes , pgsql-hackers , Daniel Farina , Craig Ringer , =?ISO-8859-1?Q?Harold_A=2E_Gim=E9nez?= Subject: Re: [PERFORM] DELETE vs TRUNCATE explanation In-reply-to: References: <4FFCCAC4.4030503@ringerc.id.au> <23853.1342015548@sss.pgh.pa.us> <32078D4B40DD40ECB739D0ECD7D95996@gmail.com> <19949.1342376967@sss.pgh.pa.us> <9603.1342454919@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Mon, 16 Jul 2012 12:26:06 -0400" Date: Mon, 16 Jul 2012 12:36:31 -0400 Message-ID: <11952.1342456591@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/714 X-Sequence-Number: 211397 Robert Haas writes: > On Mon, Jul 16, 2012 at 12:08 PM, Tom Lane wrote: >> Uh, that's exactly what's under discussion. Not sending useless fsync >> requests when fsync is off is just one part of it; a part that happens >> to be quite useful for some test scenarios, even if not so much for >> production. (IIRC, the original complainant in this thread was running >> fsync off.) > My point is that if sending fsync requests is cheap enough, then not > sending them won't save anything meaningful. Well, that argument is exactly why the code is designed the way it is... but we are now finding out that sending useless fsync requests isn't as cheap as all that. The larger point here, in any case, is that I don't believe anyone wants to expend a good deal of skull sweat and possibly performance on ensuring that transitioning from fsync off to fsync on in an active database is a reliable operation. It does not seem like something we are ever going to recommend, and we have surely got nine hundred ninety nine other things that are more useful to spend development time on. regards, tom lane