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

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Will modifications to unlogged tables also be flused to disk?
Date: 2014-02-15 11:12:48
Message-ID: 20140215111248.GA28625@tux
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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, it doesn't mention what happens to the data when
> it is written directly to the database.
>
> Will unlogged tables also cause sync/fsync calls, or will they stay in
> the page cache of the system as they will be lost anyway after a
> recovery?
>
> Thank you in advance, Clemens

They will lost after a crash, but after a regular shutdown / restart all
data in the table.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Clemens Eisserer 2014-02-15 11:22:56 Re: Will modifications to unlogged tables also be flused to disk?
Previous Message Clemens Eisserer 2014-02-15 11:03:11 Will modifications to unlogged tables also be flused to disk?