Обсуждение: Re: [9.0] hot standby plus streaming replication

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

Re: [9.0] hot standby plus streaming replication

От
Gabriele Bartolini
Дата:
  Ciao Michele,

 > both server (master and standby) need a common directory where read
and write the wal files?

Not necessarily. You can use for instance scp to ship the WAL file from
the master to the standby using the network.

 > Just another question about replication: there is the possibility to
build a sync between a 32 and a 64 bit (on linux)?

As stated in the documentation
(http://www.postgresql.org/docs/9.0/static/warm-standby.html), the
hardware architecture must be the same.

Hope this helps.

Ciao,
Gabriele

--
  Gabriele Bartolini - 2ndQuadrant Italia
  PostgreSQL Training, Services and Support
  gabriele.bartolini@2ndQuadrant.it | www.2ndQuadrant.it


Re: [9.0] hot standby plus streaming replication

От
Michele Petrazzo - Unipex
Дата:
Gabriele Bartolini ha scritto:
> Ciao Michele,

Ciao ;)

>
>> both server (master and standby) need a common directory where
>> read
>>
> and write the wal files?
>
> Not necessarily. You can use for instance scp to ship the WAL file
> from the master to the standby using the network.
>

Thanks for the explain, but...
- why in my tests, _whitout_ common direcotory, master and slave keep in
sync also if I shutdown slave, add (in my last tests) something about
100k record (although little ones) on the master and then after woke up
the slave in about 2/3 seconds I have all the dbs in sync? It's just
luck or there are something that I don't understand?
- If I have to copy (scp / rsync / etc...) the files, which interval I
have to follow? And also, when the slave will read these files? There
are something like inotify or I have to say to slave "my friend, there
are updates from master. Keep in sync!"

>> Just another question about replication: there is the possibility
>> to
> build a sync between a 32 and a 64 bit (on linux)?
>
> As stated in the documentation
> (http://www.postgresql.org/docs/9.0/static/warm-standby.html), the
> hardware architecture must be the same.
>

If I read before this page, I spared a lot of tries!

> Hope this helps.
>
> Ciao, Gabriele
>

Thanks a lot,
Michele

P.s. Glad to see that also in Italy there are PostgreSQL guru ;)

Re: [9.0] hot standby plus streaming replication

От
Jayadevan M
Дата:
>
> P.s. Glad to see that also in Italy there are PostgreSQL guru ;)
>
Glad to see that more people are using Indian words (Guru) :)
http://en.wikipedia.org/wiki/Guru

Regards,
Jayadevan





DISCLAIMER:

"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."






Re: [9.0] hot standby plus streaming replication

От
Fujii Masao
Дата:
On Fri, Oct 1, 2010 at 4:02 PM, Michele Petrazzo - Unipex
<michele.petrazzo@unipex.it> wrote:
> - why in my tests, _whitout_ common direcotory, master and slave keep in
> sync also if I shutdown slave, add (in my last tests) something about
> 100k record (although little ones) on the master and then after woke up
> the slave in about 2/3 seconds I have all the dbs in sync?

Because the master had the WAL files containing that 100k record in its
pg_xlog directory. If those WAL files were unfortunately removed from
the master before you started the standby, the standby would not have
been in sync with the master.

You can specify how many WAL files you'd keep in the master by using
wal_keep_segments parameter.
http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html#RUNTIME-CONFIG-REPLICATION

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Re: [9.0] hot standby plus streaming replication

От
Michele Petrazzo - Unipex
Дата:
Fujii Masao ha scritto:
> On Fri, Oct 1, 2010 at 4:02 PM, Michele Petrazzo - Unipex
> <michele.petrazzo@unipex.it>  wrote:
>> - why in my tests, _whitout_ common direcotory, master and slave
>> keep in sync also if I shutdown slave, add (in my last tests)
>> something about 100k record (although little ones) on the master
>> and then after woke up the slave in about 2/3 seconds I have all
>> the dbs in sync?
>
> Because the master had the WAL files containing that 100k record in
> its pg_xlog directory. If those WAL files were unfortunately removed
>  from the master before you started the standby, the standby would
> not have been in sync with the master.
>

This was the explain that I was looking for!
Do you know if there is a talk or a "best practice" about keep in sync a
master/slave couple without a shared directory? Something that talk
about the number of a typical data that can be keep in sync.
Can be very useful and more simple to maintain an installation without a
shared than a one with it and I think that more users will be happy with!

> You can specify how many WAL files you'd keep in the master by using
> wal_keep_segments parameter.
> http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html#RUNTIME-CONFIG-REPLICATION
>

Seen!
Thanks a lot,
Michele