Re: [pgsql-hackers] Daily digest v1.5568 (24 messages)
I wonder if this idea might be taken a little further, to allow
read-only tablespaces?
This would allow old partitions in very large databases to be kept on
read-only media, and would allow normal backups to ignore this
unchanging set of data.
It also allows for certain specific optimisations for this type of data,
as the MVCC rules are now relaxed. Inclusion of a row in a read-only
index is now enough to guarantee the visibility of that row to all
backends, and fetches based solely on the index now become possible.
FWIW, Oracle does something like this. Just a thought.
__
Marc
On Mon, 2005-11-21 at 09:53 -0400, pgsql-hackers-owner@postgresql.org
wrote:
Show quoted text
Date: Sun, 20 Nov 2005 22:39:49 +0200 (EET)
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: pgsql-hackers@postgresql.org
Subject: Data directory on read-only media
Message-ID: <Pine.OSF.4.61.0511201815450.399601@kosh.hut.fi>Hi,
I've been thinking about running postgres from read-only media. It's
handy for creating demo CDs etc. I hacked together a patch that
allows
you to run Postgres without write permissions to the data directory.
Import Notes
Reply to msg id not found: 200511211405.jALE5QnV022433@www.commandprompt.comReference msg id not found: 200511211405.jALE5QnV022433@www.commandprompt.com
On Mon, 21 Nov 2005, Marc Munro wrote:
I wonder if this idea might be taken a little further, to allow
read-only tablespaces?This would allow old partitions in very large databases to be kept on
read-only media, and would allow normal backups to ignore this
unchanging set of data.
I guess you could do that, but it's really quite a different problem.
It also allows for certain specific optimisations for this type of data,
as the MVCC rules are now relaxed. Inclusion of a row in a read-only
index is now enough to guarantee the visibility of that row to all
backends, and fetches based solely on the index now become possible.
There's this TODO:
Allow data to be pulled directly from indexes
Currently indexes do not have enough tuple visibility information to
allow data to be pulled from the index without also accessing the heap.
One way to allow this is to set a bit to index tuples to indicate if a
tuple is currently visible to all transactions when the first valid
heap lookup happens. This bit would have to be cleared when a heap
tuple is expired.
That method doesn't require read-only tablespaces.
- Heikki