Обсуждение: WAL file compatibility

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

WAL file compatibility

От
Radamanthus Batnag
Дата:
I have a PostgreSQL production server running on CentOS (compiled from
source), and I'm planning to setup a hot standby database on another
server, running on Ubuntu (default Ubuntu binaries).

The production server is running on 8.3.5, and the planned Ubuntu hot
standby is running on 8.3.x. Can I use the production WAL files on the
Ubuntu standby without problems?

Thanks in advance.

Radamanthus E. Batnag
Senior Technology Architect
Devex (The Development Executive Group)
Do Good. Do It Well. ™







Re: WAL file compatibility

От
Tom Lane
Дата:
Radamanthus Batnag <rad.batnag@devex.com> writes:
> I have a PostgreSQL production server running on CentOS (compiled from
> source), and I'm planning to setup a hot standby database on another
> server, running on Ubuntu (default Ubuntu binaries).

> The production server is running on 8.3.5, and the planned Ubuntu hot
> standby is running on 8.3.x. Can I use the production WAL files on the
> Ubuntu standby without problems?

The source and destination servers have to be the same major PG release,
same architecture (no 32-bit vs 64-bit for instance), and built with the
same configure options.  OS per se shouldn't matter, but you could
easily get burnt on configure options if you use binaries obtained from
different packagers.  Compare pg_config output or check the fields
listed by pg_controldata.

            regards, tom lane

Re: WAL file compatibility

От
Jaime Casanova
Дата:
On Tue, Oct 20, 2009 at 9:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> OS per se shouldn't matter
>

unless you try to do it between windows and some flavor of linux

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

Re: WAL file compatibility

От
Tom Lane
Дата:
Jaime Casanova <jcasanov@systemguards.com.ec> writes:
> On Tue, Oct 20, 2009 at 9:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> OS per se shouldn't matter

> unless you try to do it between windows and some flavor of linux

hmmm ... even there, the only risk factor I see would be incompatible
locale behaviors, which you could avoid by making sure to use C locale
on both sides.  That could possibly be an issue between any two OSes,
I suppose.

            regards, tom lane

Re: WAL file compatibility

От
Jaime Casanova
Дата:
On Tue, Oct 20, 2009 at 10:56 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jaime Casanova <jcasanov@systemguards.com.ec> writes:
>> On Tue, Oct 20, 2009 at 9:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> OS per se shouldn't matter
>
>> unless you try to do it between windows and some flavor of linux
>
> hmmm ... even there, the only risk factor I see would be incompatible
> locale behaviors, which you could avoid by making sure to use C locale
> on both sides.  That could possibly be an issue between any two OSes,
> I suppose.
>

mmm... i was convinced windows had diferences in binary files just
like on text files (ie: in text files there are differences because of
the EOL character) but a litlle test seems to confirm that a WAL file
generated on windows could be read on linux.

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157

Re: WAL file compatibility

От
Steve Crawford
Дата:
Tom Lane wrote:
> ...
> The source and destination servers have to be the same major PG release,
> same architecture (no 32-bit vs 64-bit for instance), and built with the
> same configure options.  OS per se shouldn't matter, but you could
> easily get burnt on configure options if you use binaries obtained from
> different packagers.  Compare pg_config output or check the fields
> listed by pg_controldata.
>
>             regards, tom lane
>
>
Out of curiosity, will Pg automatically detect incompatible WAL files
and refuse to operate on them throwing the appropriate error or can it
appear to work for a while until it suddenly doesn't?

Cheers,
Steve

Re: WAL file compatibility

От
Tom Lane
Дата:
Steve Crawford <scrawford@pinpointresearch.com> writes:
> Tom Lane wrote:
>> The source and destination servers have to be the same major PG release,
>> same architecture (no 32-bit vs 64-bit for instance), and built with the
>> same configure options.  OS per se shouldn't matter, but you could
>> easily get burnt on configure options if you use binaries obtained from
>> different packagers.  Compare pg_config output or check the fields
>> listed by pg_controldata.

> Out of curiosity, will Pg automatically detect incompatible WAL files
> and refuse to operate on them throwing the appropriate error or can it
> appear to work for a while until it suddenly doesn't?

There are checks on the contents of pg_control, not directly on WAL
files, but the system identifier checks should link the two together.

I suspect the largest practical risk is that different OSes might assign
different behaviors to the same locale name.  There's really no good way
for Postgres to detect that :-(

            regards, tom lane

Re: WAL file compatibility

От
Jaime Casanova
Дата:
On Mon, Oct 26, 2009 at 9:03 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I suspect the largest practical risk is that different OSes might assign
> different behaviors to the same locale name.  There's really no good way
> for Postgres to detect that :-(
>

Alvaro just remembers me that tablespaces path could be a problem too...

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157