From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Yang Zhang <yanghatespam(at)gmail(dot)com> |
Cc: | Thom Brown <thom(at)linux(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: "Unlogged indexes" |
Date: | 2013-05-06 23:43:03 |
Message-ID: | CAB7nPqSFwo+_=oFQRG+9CgJvs+GmD4JFgdG4=s-j=cAg9D_MfQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, May 4, 2013 at 5:53 AM, Yang Zhang <yanghatespam(at)gmail(dot)com> wrote:
> Yeah, I know that indexes for unlogged tables are unlogged. I was
> just wondering if you could do this for logged tables. (Safely, such
> that on crash recovery WAL replay won't throw up, these can be omitted
> from base backups, etc.)
>
No, you cannot create unlogged indexes on logged tables. An unlogged tables
is
truncated when a server starts after a crash, and so are its indexes that
become
empty by default. But having an unlogged index on a logged table would mean
that
you would need to truncate and regenerate the index after a crash as the
data of
the normal table is still here, what would impact the performance boot of
the server.
Do you have a particular use-case in mind? I cannot see advantages directly
advantages in having an unlogged index on a logged table...
Regards,
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Rogerson | 2013-05-07 08:49:16 | Re: Composite fields and the query planner |
Previous Message | Erik Jones | 2013-05-06 20:03:47 | Temp files and process memory footprint |