From: Craig Ringer <ringerc@ringerc.id.au>
To: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres INSERT performance and scalability
Date: Tue, 20 Sep 2011 13:04:56 +0800
Message-ID: <4E781EF8.3000400@ringerc.id.au> (raw)
In-Reply-To: <CAKuK5J0-fEHVm_c_H6T6XMk9PQE6zDohBHqZ39CHu5Hz0kGC4g@mail.gmail.com>
References: <CAMhtkAb1F1SOyz1mzeeWaQehoqtzk29oLVVG=NzKEoGS9bPDNg@mail.gmail.com>
<20110920005342.GO12765@tamriel.snowman.net>
<CAKuK5J0-fEHVm_c_H6T6XMk9PQE6zDohBHqZ39CHu5Hz0kGC4g@mail.gmail.com>
On 09/20/2011 09:21 AM, Jon Nelson wrote:
> Isn't the WAL basically COW?
Nope, it's a lot more like a filesystem journal - though it includes all
data, not just metadata like filesystem journals usually do.
Now, you could argue that PostgreSQL uses a copy-on-write like system to
maintain row versions so that already-running statements (or
SERIALIZABLE transactions) don't see data from the future and to
maintain rollback data for uncommitted transactions. It's the *new* data
that gets written to the WAL, though, not the old data.
(OK, if you have full_page_writes enabled you might get a mix of old and
new data written to WAL, but that's an implementation detail).
--
Craig Ringer
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: pgsql-performance@postgresql.org
Cc: ringerc@ringerc.id.au, jnelson+pgsql@jamponi.net
Subject: Re: Postgres INSERT performance and scalability
In-Reply-To: <4E781EF8.3000400@ringerc.id.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox