pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yves Dorfsman <yves@zioup.com>
To: pgsql-performance@postgresql.org
Subject: Re: Proposal for unlogged tables
Date: Mon, 4 Jan 2016 07:27:52 -0700
Message-ID: <568A8168.1070900@zioup.com> (raw)
In-Reply-To: <568A429C.2010507@allaroundtheworld.fr>
References: <568A429C.2010507@allaroundtheworld.fr>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On 2016-01-04 02:59, Mark Zealey wrote:
> shutdown all unlogged tables will be truncated. Obviously with 9.5 we can now
> alter tables to be logged/unlogged after insert but this will still write all
> the inserts into the WAL.

I haven't tried, but won't converting an unlogged table into a logged table
write all the inserts at once instead of once per insert?

Or are you wanting to do more bulk insert into that table later?

> I can understand the requirement to truncate tables
> with active IO at the point of unclean shutdown where you may get corrupted
> data; but I'm interested to find out how easy it would be to not perform the
> truncate for historical unlogged tables.

Are you trying to avoid running a CHECKPOINT? Are you afraid the activity on
the other tables will create too much I/O?

> If the last data modification
> statement was run more than eg 30 seconds or 1 minute before an unclean
> shutdown (or the data was otherwise flushed to disk and there was no IO since
> then) can we not assume that the data is not corrupted and hence not truncate
> the unlogged tables?

I have to admit that I have been surprised by this, it feels like unlogged
tables are never written properly unless you do an explicit CHECKSUM.


-- 
http://yves.zioup.com
gpg: 4096R/32B0F416



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (6+ messages)  latest in thread

Message-ID: <568A8168.1070900@zioup.com>
Permalink:  ../568A8168.1070900@zioup.com/
Also on:    postgresql.org/message-id/568A8168.1070900@zioup.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: yves@zioup.com
  Subject: Re: Proposal for unlogged tables
  In-Reply-To: <568A8168.1070900@zioup.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox