From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jim Nasby <Jim.Nasby@BlueTreble.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Matheus de Oliveira <matioli.matheus@gmail.com>
Cc: dgabriel <gabriel.dodan@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: unlogged tables
Date: Mon, 13 Apr 2015 18:13:12 -0300
Message-ID: <20150413211312.GS4369@alvh.no-ip.org> (raw)
In-Reply-To: <552C2E03.5060800@BlueTreble.com>
References: <005501cca0ad$b9478440$2bd68cc0$@devshock.com>
<1428953502160-5845576.post@n5.nabble.com>
<CAJghg4+NoOaip1VaBK9+cY-LYjmUr_9kFNZ3sdWq5wQRNVc9HA@mail.gmail.com>
<CAKFQuwYtdCF1BFx7pji78tshjUD-oVCoOOnBcr935_tq5gY-Ag@mail.gmail.com>
<552C2E03.5060800@BlueTreble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Jim Nasby wrote:
> Yeah, this is not something that would be very easy to accomplish, because a
> buffer can get evicted and written to disk at any point. It wouldn't be too
> hard to read every unlogged table during recovery and see if there are any
> pages that were written after the last checkpoint, but that obviously won't
> be very fast.
If you consider only tables, then yeah perhaps this is easy to
accomplish (not really convinced myself). But if you consider indexes,
things are not so easy anymore.
In the thread from 2011 (which this started as a reply to) the OP was
doing frequent UPDATEs to keep track of counts of something. I think
that would be better served by using INSERTs of deltas and periodic
accumulation of grouped values, as suggested in
http://www.postgresql.org/message-id/20150305211601.GW3291@alvh.no-ip.org
This has actually been suggested many times over the years.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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: alvherre@2ndquadrant.com, Jim.Nasby@BlueTreble.com, david.g.johnston@gmail.com, matioli.matheus@gmail.com, gabriel.dodan@gmail.com
Subject: Re: unlogged tables
In-Reply-To: <20150413211312.GS4369@alvh.no-ip.org>
* 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