Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XHZXz-000264-15 for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Aug 2014 14:29:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XHZXy-0000eC-G0 for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Aug 2014 14:29:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XHZXw-0000bU-Ql for pgsql-bugs@postgresql.org; Wed, 13 Aug 2014 14:29:01 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XHZXs-0002pu-Ph for pgsql-bugs@postgresql.org; Wed, 13 Aug 2014 14:28:59 +0000 Received: by mail-pa0-f42.google.com with SMTP id lf10so15076023pab.1 for ; Wed, 13 Aug 2014 07:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:references:in-reply-to:subject:date :mime-version:content-type:content-transfer-encoding; bh=GgSx5zlCppr4lwU4w4UANi5If1jfPGOxmh92evGUd4A=; b=Y02C3p3+uaIpoF86xZoQ7SHLmd3ZiHVnaU6TGgt4BfNC560sCeArdI/lwmj/yEEdbf jQkWezKJGB0WE2pWqhzitjR9xE0yfY7QeoACAZjiLR5WttGuVuTizKiBKVVIUbiEp84i 14FSBvJMyioh1+6MxAatpDicwhVXRToubqq7e9UFe8KqLCDQwi2lkUWZdDb9S2wgxALr h7DkTdH/CpbjZ5tr306OTcw+C26pQtikK/gURkYTOdsqeWX9eZCtXYlxVrb5G4PMhL2e toZ6YT9WU8Yq8q5Cui6AmMoA/3/dUATYDoYWDT0b37dFECmN0mpI/cYClLK35PP9tWjm AYpQ== X-Received: by 10.66.197.132 with SMTP id iu4mr4392005pac.132.1407940132917; Wed, 13 Aug 2014 07:28:52 -0700 (PDT) Received: from maumau (p23196-ipngn100307sizuokaden.shizuoka.ocn.ne.jp. [153.131.144.196]) by mx.google.com with ESMTPSA id u7sm3344960pdj.34.2014.08.13.07.28.50 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Aug 2014 07:28:51 -0700 (PDT) Message-ID: <149312E3EED04551A6E5F394AF029DF2@maumau> From: "MauMau" To: "Andres Freund" Cc: "Pavan Deolasee" , "Tom Lane" , "maxim.boguk" , "Pg Bugs" References: <20140618101045.GG3115@awork2.anarazel.de> <20140618110240.GJ3115@awork2.anarazel.de> <11621.1403099146@sss.pgh.pa.us> <20140618141949.GC3968@awork2.anarazel.de> <246F964E3CEB4B8D85FC5876CA37CC36@maumau> <20140813130720.GC28982@awork2.anarazel.de> In-Reply-To: <20140813130720.GC28982@awork2.anarazel.de> Subject: Re: BUG #10675: alter database set tablespace and unlogged table Date: Wed, 13 Aug 2014 23:31:46 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-Pg-Spam-Score: -1.3 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org From: "Andres Freund" > That'd mean that the next pointrelease will incur *significantly* higher > IO in many setups. If you currently have a workload where all dirty > buffers of unlogged tables fit in s_b you'll never have any OS > writes. That'd completely change. Yes, that's the only headache... But I'm not worried so much, because bgwriter and/or backends may write out dirty buffers for unlogged tables, so the total I/O is not low anyway. > A compromise would be to couple it to CHECKPOINT_IMMEDIATE and/or _FORCE > instead of creating a new flag - I think this is actually what Tom > proposed. That rescues the CREATE DATABASE case, and would probably prevent potential similar problems. >> * There's a greater danger of losing data during operating system >> restart. >> For example, IIRC, Windows gives only 20 seconds to terminate all >> services >> during OS shutdown. If many dirty buffers for unlogged tables linger in >> the >> shared buffers, PostgreSQL service may fail to complete database >> shutdown. >> Even if the online checkpoint writes out all dirty buffers, the >> possibility >> of there being many dirty buffers at shutdown is not zero, but the >> probability would be lower. > > Meh. That won't lead to data loss, just recovery on restart. And 20s > isn't sufficient for any halfway busy database anyway. The unlogged tables are emptied (= data loss) at recovery restart. Regards MauMau -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs