public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Michael Paquier <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Unlogged tables
Date: Wed, 9 Aug 2017 07:37:29 -0700
Message-ID: <CAKFQuwZA7rZBk+rLWC=WsRXOWZzKnHhYv0C7AuiRGAg5VeoP0w@mail.gmail.com> (raw)
In-Reply-To: <CAB7nPqTaPvASbn3Sqi3J5c=QnCrZS3VNqFG9OHKqLt8Su36VmQ@mail.gmail.com>
References: <BN4PR15MB0547B6736C684F14E4E33BDF858B0@BN4PR15MB0547.namprd15.prod.outlook.com>
<CAB7nPqTaPvASbn3Sqi3J5c=QnCrZS3VNqFG9OHKqLt8Su36VmQ@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-performance>
On Wed, Aug 9, 2017 at 3:39 AM, Michael Paquier <[email protected]>
wrote:
> This triggers a table rewrite and makes sure that all the data gets
> WAL-logged. The cost to pay for durability.
>
> > Is there a way to get my cake and eat it too?
>
> Not completely. Making data durable will have a cost at the end, but
> you can leverage it.
>
>
Aren't you over-playing the role of the WAL in providing durability. An
unlogged table remains intact after a clean shutdown and so is "durable" if
one considers the primary "permanence" aspect of the word.
The trade-off the OP wishes for is "lose crash-safety to gain write-once
(to the data files) performance". Seeming having this on a per-table basis
would be part of the desirability. It sounds like OP would be willing to
place the table into "read only" mode in order to ensure this - which is
something that is not presently possible. I could envision that putting an
unlogged table into read-only mode would cause the system to ensure that
the data files are fully populated and then set a flag in the catalog that
informs the crash recovery process to go ahead and omit truncating that
particular unlogged table since the data files are known to be accurate.
David J.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Unlogged tables
In-Reply-To: <CAKFQuwZA7rZBk+rLWC=WsRXOWZzKnHhYv0C7AuiRGAg5VeoP0w@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox