From: Matt Clark <matt@ymogen.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Ragnar KjÃzrstad <postgres@ragnark.vestdata.no>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Murthy Kambhampaty <murthy.kambhampaty@goeci.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: LVM snapshots
Date: Mon, 17 Mar 2003 14:27:06 -0000
Message-ID: <OAEAKHEHCMLBLIDGAFELGEDIDBAA.matt@ymogen.net> (raw)
In-Reply-To: <5704.1047909881@sss.pgh.pa.us>
> Ragnar =?iso-8859-15?B?S2rDuHJzdGFk?= <postgres@ragnark.vestdata.no> writes:
> > So, basicly your database will be inresponsive for the time it takes to
> > take a snapshot. The time will depend on the size of the device, the
> > size of the pysical extents (the LVM "blocks") and the raw disk
> > performance, but typically we're talking about periods shorter than a
> > second.
>
> We are? On what size database? Surely it takes longer than a second to
> copy a reasonable-size database.
Ah, a misconception. The terminology is confusing. What is stored on the 'snapshot volume' is not a copy of the 'frozen volume',
but only the writes to the frozen volume. When the 'snapshot volume' is unmounted those updates then get copied back to the 'frozen
volume' which is then unfrozen. The 'snapshot volume' therefore only needs to be big enough to store as much data as will be
written to (or rather as many blocks as will be altered on) the frozen volume while the snapshot is in place.
So when you take a snapshot there is no data to be copied, and when you release a snapshot some data needs to be written back.
Since the data to be copied is nice whole disk blocks and no metadata has to be altered that's a pretty fast operation.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: matt@ymogen.net, tgl@sss.pgh.pa.us, postgres@ragnark.vestdata.no, peter_e@gmx.net, murthy.kambhampaty@goeci.com
Subject: Re: LVM snapshots
In-Reply-To: <OAEAKHEHCMLBLIDGAFELGEDIDBAA.matt@ymogen.net>
References: <5704.1047909881@sss.pgh.pa.us> <OAEAKHEHCMLBLIDGAFELGEDIDBAA.matt@ymogen.net>
* 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