Re: unlogged tables v5

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unlogged tables v5
Date: 2010-12-27 08:22:11
Message-ID: 1293438131.1193.61782.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2010-12-24 at 23:36 -0500, Robert Haas wrote:
> Here's an updated patch for unlogged tables, incorporating the
> following changes since v4:

Looks good

> 5. Support unlogged GIN indexes.

Not sure from reading the docs whether unlogged indexes are supported on
logged tables? Could you clarify (or clarify more often)? Does this
solve the hash index situation?

"The contents
+ of an unlogged table are also not replicated to standby servers."
would prefer to remove "also"

Unlogged tables aren't replicated, but they would be copied as part of a
base backup. I'd request that we have a different forkname, or some
other indicator that allows a base backup to allow exclusion of such
files, since they are going to get reset to zero very soon afterwards
anyway. Not everyone would wish it, but its a good option.

> There are a couple of open issues which I'm thinking can be left for
> future work.
>
> A. Minimization of fsync traffic. fsyncs on unlogged relations can
> potentially be postponed until shutdown time. Right now, they'll
> happen as part of the next checkpoint.

Half the fun of unlogged tables was for me the ability to skip the fsync
and the checkpoint writes. If we're using PostgreSQL as a cache, it will
be a little hard to explain why it still does writes in a huge storm
every so often. A performance feature that doesn't avoid a performance
hit seems a little strange, to say the least.

Should be easy enough to mark a flag on each buffer, only examined at
checkpoint.

> B. Unlogged GIST indexes aren't supported.

No problem. Understand specific difficulties.

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-12-27 08:32:21 Re: Streaming replication as a separate permissions
Previous Message Simon Riggs 2010-12-27 08:05:44 Re: MULTISET patch