Opening a recovering DB in for read-only access?

Lists: pgsql-hackers
From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Opening a recovering DB in for read-only access?
Date: 2008-11-21 04:45:46
Message-ID: 49263CFA.7050004@rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Sounds somewhat evil, I know, but I was wondering if it was even
remotely possible with the current design?

The reason: we are contemplating using pg_standy to create a
warm-standby. It would be a bonus if we would run read-only queries
against this DB to take some of the load off or production servers.

We currently use slony to provide warm-standby *and* read-only access,
but pg_standby is a great deal more appealing...especially if there was
some way to do read-only access at the same time.

FWIW, the data would not even need to be completely consistent ... the
kinds of things we are looking at offloading are large summary-type
sequential scans of big tables.

--
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 03 5330 3171 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
http://www.rhyme.com.au <http://www.rhyme.com.au/>
| / \|
| --________--
GPG key available upon request. | /
|/


From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "Philip Warner" <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Opening a recovering DB in for read-only access?
Date: 2008-11-21 05:12:29
Message-ID: 34d269d40811202112m1dc1d27dg77371876071e3ce3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Nov 20, 2008 at 21:45, Philip Warner <pjw(at)rhyme(dot)com(dot)au> wrote:
>
> Sounds somewhat evil, I know, but I was wondering if it was even
> remotely possible with the current design?
>
> The reason: we are contemplating using pg_standy to create a
> warm-standby. It would be a bonus if we would run read-only queries
> against this DB to take some of the load off or production servers.
>
> We currently use slony to provide warm-standby *and* read-only access,
> but pg_standby is a great deal more appealing...especially if there was
> some way to do read-only access at the same time.
>
> FWIW, the data would not even need to be completely consistent ... the
> kinds of things we are looking at offloading are large summary-type
> sequential scans of big tables.

Uhh sounds like you are describing hot standby (currently in the works
for 8.4) see:
http://wiki.postgresql.org/wiki/Hot_Standby
http://archives.postgresql.org/pgsql-hackers/2008-11/msg00005.php

Synchronous replication might also be of interest
http://archives.postgresql.org/pgsql-hackers/2008-11/msg00987.php


From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Alex Hunsaker <badalex(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Opening a recovering DB in for read-only access?
Date: 2008-11-21 05:29:41
Message-ID: 49264745.9080401@rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alex Hunsaker wrote
>
> Uhh sounds like you are describing hot standby (currently in the works
> for 8.4) see:
>

Yep. That's exactly what I'm talking about. Thanks for the links!


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Opening a recovering DB in for read-only access?
Date: 2008-11-21 16:53:22
Message-ID: 1227286403.7015.88.camel@hp_dx2400_1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On Fri, 2008-11-21 at 15:45 +1100, Philip Warner wrote:
> Sounds somewhat evil, I know, but I was wondering if it was even
> remotely possible with the current design?
>
> The reason: we are contemplating using pg_standy to create a
> warm-standby. It would be a bonus if we would run read-only queries
> against this DB to take some of the load off or production servers.
>
> We currently use slony to provide warm-standby *and* read-only access,
> but pg_standby is a great deal more appealing...especially if there was
> some way to do read-only access at the same time.

Yes, exactly what I'm working on now, currently patch in review.

> FWIW, the data would not even need to be completely consistent ... the
> kinds of things we are looking at offloading are large summary-type
> sequential scans of big tables.

Access to inconsistent data has not been agreed. We will only allow
access to consistent data with this approach.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support