Warm Standby question

Поиск
Список
Период
Сортировка
Искать

Warm Standby question

От:
Thomas Kellerer <spam_eater@gmx.net>
Дата:
Hi,

(Note: I have never used log shipping before, I'm just interested in the 
concepts, so I'm might be missing a very important aspect)

I was reading the blog entry about HA and warm standby:
http://scale-out-blog.blogspot.com/2009/02/simple-ha-with-postgresql-point-in-time.html

The image that explained how log shipping works, strikes me as being a bit too 
complex.


According to the picture it basically works like this:

Master -> Copy master archive directory -> Copy to standby archive dir -> copy 
to pg_xlogs.

When I look at this chain I'm asking myself, why do I need the two archive 
directories?

Why can't the master copy the files directly into the pg_xlogs directory of the 
standby server?

Thanks
Thomas

Re: Warm Standby question

От:
"Scot Kreienkamp" <SKreien@la-z-boy.com>
Дата:
Probably can.  But you're talking about disabling off-host archiving.
The whole point behind this is prevention in case a host hard drive
fails... if it fails and you don't use off-host archiving then you've
lost the files you need to rebuild the database along with the original
database.

Thanks,
 
Scot Kreienkamp
La-Z-Boy Inc.
skreien@la-z-boy.com
734-242-1444 ext 6379
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Thomas Kellerer
Sent: Sunday, February 01, 2009 7:47 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Warm Standby question

Hi,

(Note: I have never used log shipping before, I'm just interested in the

concepts, so I'm might be missing a very important aspect)

I was reading the blog entry about HA and warm standby:
http://scale-out-blog.blogspot.com/2009/02/simple-ha-with-postgresql-poi
nt-in-time.html

The image that explained how log shipping works, strikes me as being a
bit too 
complex.


According to the picture it basically works like this:

Master -> Copy master archive directory -> Copy to standby archive dir
-> copy 
to pg_xlogs.

When I look at this chain I'm asking myself, why do I need the two
archive 
directories?

Why can't the master copy the files directly into the pg_xlogs directory
of the 
standby server?

Thanks
Thomas



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: Warm Standby question

От:
Thomas Kellerer <spam_eater@gmx.net>
Дата:
Thanks for the answer.

I see the point with the backup :)

Regards
Thomas

Scot Kreienkamp, 02.02.2009 16:19:
> Probably can.  But you're talking about disabling off-host archiving.
> The whole point behind this is prevention in case a host hard drive
> fails... if it fails and you don't use off-host archiving then you've
> lost the files you need to rebuild the database along with the original
> database.
> 
> Thanks,
>  
> Scot Kreienkamp
> La-Z-Boy Inc.
> skreien@la-z-boy.com
> 734-242-1444 ext 6379
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Thomas Kellerer
> Sent: Sunday, February 01, 2009 7:47 AM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Warm Standby question
> 
> Hi,
> 
> (Note: I have never used log shipping before, I'm just interested in the
> 
> concepts, so I'm might be missing a very important aspect)
> 
> I was reading the blog entry about HA and warm standby:
> http://scale-out-blog.blogspot.com/2009/02/simple-ha-with-postgresql-poi
> nt-in-time.html
> 
> The image that explained how log shipping works, strikes me as being a
> bit too 
> complex.
>  -w/s1600-h/pg_warm_standby.png>
> 
> According to the picture it basically works like this:
> 
> Master -> Copy master archive directory -> Copy to standby archive dir
> -> copy 
> to pg_xlogs.
> 
> When I look at this chain I'm asking myself, why do I need the two
> archive 
> directories?
> 
> Why can't the master copy the files directly into the pg_xlogs directory
> of the 
> standby server?
> 
> Thanks
> Thomas
> 
> 
> 

Re: Warm Standby question

От:
Erik Jones <ejones@engineyard.com>
Дата:

On Feb 1, 2009, at 4:47 AM, Thomas Kellerer wrote:

> Hi,
>
> (Note: I have never used log shipping before, I'm just interested in  
> the concepts, so I'm might be missing a very important aspect)
>
> I was reading the blog entry about HA and warm standby:
> http://scale-out-blog.blogspot.com/2009/02/simple-ha-with-postgresql-point-in-time.html
>
> The image that explained how log shipping works, strikes me as being  
> a bit too complex.
>  >
>
> According to the picture it basically works like this:
>
> Master -> Copy master archive directory -> Copy to standby archive  
> dir -> copy to pg_xlogs.
>
> When I look at this chain I'm asking myself, why do I need the two  
> archive directories?
>
> Why can't the master copy the files directly into the pg_xlogs  
> directory of the standby server?

Well, on the master the implementation has to be resilient to issues  
with the archive_command and Postgres re-uses files in the pg_xlog  
directory.  If they weren't copied into the archive_status directory  
then if a file couldn't be shipped for some reason you'd run the risk  
of the file getting re-used before it was successfully pushed to the  
standby.

As to where they go on the standby, remember that log shipping is not  
just for warm standby implementation -- it's also a valid backup  
method, i.e. archive the transaction logs along with a snapshot of the  
data directory.  In addition, the copy of a file into the pg_xlog  
directory needs to be atomic and there's no guarantee that any given  
archive_command will use a tool that does atomic copies.

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k





FAQ