Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XHZbw-0002GU-VI for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Aug 2014 14:33:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XHZbw-0002EP-FL for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Aug 2014 14:33:08 +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 1XHZbv-0002EI-HA for pgsql-bugs@postgresql.org; Wed, 13 Aug 2014 14:33:07 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XHZbr-0002vj-Dx for pgsql-bugs@postgresql.org; Wed, 13 Aug 2014 14:33:06 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id AB5A3560006; Wed, 13 Aug 2014 16:33:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-6.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC5C53.dip0.t-ipconnect.de [93.220.92.83]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id E48E5560002; Wed, 13 Aug 2014 16:32:58 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id 630CD101C9C; Wed, 13 Aug 2014 16:32:58 +0200 (CEST) Date: Wed, 13 Aug 2014 16:32:58 +0200 From: Andres Freund To: MauMau Cc: Pavan Deolasee , Tom Lane , "maxim.boguk" , Pg Bugs Subject: Re: BUG #10675: alter database set tablespace and unlogged table Message-ID: <20140813143258.GD28982@awork2.anarazel.de> 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> <149312E3EED04551A6E5F394AF029DF2@maumau> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <149312E3EED04551A6E5F394AF029DF2@maumau> X-Pg-Spam-Score: -2.6 (--) 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 On 2014-08-13 23:31:46 +0900, MauMau wrote: > 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. If the workload fits in s_b - not an infrequent thing with today's memory sizes - that's simply not true. > >>* 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. If that's data loss you shouldn't be using unlogged tables. That's not an argument. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs