On Fri, Dec 10, 2010 at 8:16 PM, Robert Haas <robertmh...@gmail.com> wrote: > > As I was working on the hash index support, it occurred to me that at > some point in the future, we might want to allow an unlogged index on > a permanent table.
That is the feature I would be most excited about. > With the current patch, an index is unlogged if > and only if the corresponding table is unlogged, and both the table > and the index are reset to empty on restart. But we could have a > slightly different flavor of index that, instead of being reset to > empty, just gets marked invalid, perhaps by truncating the file to > zero-length (and adding some code to treat that as something other > than a hard error). Perhaps you could even arrange for autovacuum to > kick off an automatic rebuild, Or just have rebuilding the index as part of crash recovery. I wouldn't use the feature anyway on indexes that would take more than a few seconds to rebuild, And wouldn't want to advertise the database as being available when it is essentially crippled from missing indexes. I'd rather bite the bullet up front. I would think of it is as declaring that, instead of making the index recoverable via WAL logging and replay, instead make it recoverable by rebuilding. So in that way it is quit unlike unlogged tables, in that we are not risking any data, just giving the database a hint about what the most expeditious way to maintain the index might be. Well, more of an order than a hint, I guess. Cheers, Jeff -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers