Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X2JMI-0004Gl-QB for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Jul 2014 12:09:54 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X2JMI-0003e5-AX for pgsql-bugs@arkaria.postgresql.org; Wed, 02 Jul 2014 12:09:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X2JMH-0003dy-91 for pgsql-bugs@postgresql.org; Wed, 02 Jul 2014 12:09:53 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X2JME-0002zH-9Z for pgsql-bugs@postgresql.org; Wed, 02 Jul 2014 12:09:51 +0000 Received: by mail.anarazel.de (Postfix, from userid 108) id 69488500002; Wed, 2 Jul 2014 14:09:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail X-Spam-Level: X-Spam-Status: No, score=-5.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from anarazel.de (p5DDC581C.dip0.t-ipconnect.de [93.220.88.28]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 3A548500001; Wed, 2 Jul 2014 14:09:46 +0200 (CEST) Received: by anarazel.de (Postfix, from userid 1000) id C08CD1004C1; Wed, 2 Jul 2014 14:09:45 +0200 (CEST) Date: Wed, 2 Jul 2014 14:09:45 +0200 From: Andres Freund To: Pavan Deolasee Cc: Tom Lane , "maxim.boguk" , Pg Bugs Subject: Re: BUG #10675: alter database set tablespace and unlogged table Message-ID: <20140702120945.GN21169@awork2.anarazel.de> References: <20140617032438.2585.42918@wrigleys.postgresql.org> <20140618101045.GG3115@awork2.anarazel.de> <20140618110240.GJ3115@awork2.anarazel.de> <11621.1403099146@sss.pgh.pa.us> <20140618141949.GC3968@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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-07-02 17:28:25 +0530, Pavan Deolasee wrote: > On Fri, Jun 20, 2014 at 11:34 PM, Pavan Deolasee > wrote: > > > > > > Looks like there is no agreement on this. I agree with Andreas that given > > the current mechanism of truncating unlogged relations at the end of redo > > recovery, there is no danger in not flushing the dirty buffers belonging to > > unlogged relation at a normal checkpoint. Having said that, I find it > > confusing that we don't do that, for one reason that Tom explained and also > > because there is practically just no way to flush those dirty buffers to > > disk if the user wants so. > > > > Also, there had been discussions about altering unlogged tables to normal > > tables and we may also want to improve upon the current mechanism of > > truncating unlogged relations at the end of recovery even if the table was > > fully synced to the disk. It looks simpler to just flush everything instead > > of devising a new flag for checkpoint. > > > > Anyone else has an opinion on this? > > > > > Since I did not hear anything on this, I created a patch that adds a new > flag to tell checkpointer to flush all pages to the disk. Tom (and even I) > have reservations about the approach, but I would nevertheless leave it to > the committer to decide. IMV we must fix this bug one way or the other. > Otherwise users face risk of failing to do clean shutdown. I think one reason for the separate flag is that the checkpoint performed by pg_start_backup/pg_basebackup shouldn't just become more expensive because unlogged tables are needlessly flushed to disk. After all, unlogged tables are used because normal tables have a too high overhead in that scenario. 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