Re: Will modifications to unlogged tables also be flused to disk?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Clemens Eisserer <linuxhippy(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Will modifications to unlogged tables also be flused to disk?
Date: 2014-02-17 18:52:13
Message-ID: CAMkU=1xr5bAX+geeQm9r3hki3VesW7vt_iPpRP_a+S04SuxXyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Feb 15, 2014 at 3:03 AM, Clemens Eisserer <linuxhippy(at)gmail(dot)com>wrote:

> Hi,
>
> I would like to use postgresql's unlogged tables on an embedded system
> to avoid frequent writes to flash memory.
> While documentation clearly states that unlogged tables don't have to
> go through the WAL,

That's not really true. There are no per-row WAL records. There is still
a per-transaction WAL record, the commit record. If you only care about the
timing of the WAL and not the volume, changing to unlogged will not make a
difference. (These commit-only records are automatically dealt with
asynchronously, even if synchronous-commit is on.)

Cheers,

Jeff

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2014-02-17 19:40:43 Re: CREATE EXTENSION does not seem to work in 9.2
Previous Message Tom Lane 2014-02-17 18:35:11 Re: Deleted files still open long after droping a database