Re: unlogged tables v5 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: unlogged tables v5
Date
Msg-id 1293438131.1193.61782.camel@ebony
Whole thread Raw
In response to unlogged tables v5  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: unlogged tables v5
List 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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: MULTISET patch
Next
From: Simon Riggs
Date:
Subject: Re: Streaming replication as a separate permissions