Thread: pitr question
Excuse the ignorance, but I see the following in the docs: 'In any case the hardware architecture must be the same — shipping from, say, a 32-bit to a 64-bit system will not work.' Is this specific to the hardware? That is to say, can I use pitr wal shipping from 64 bit hardware to 64 bit hardware, where one machine is running a 32 bit OS and the other is running a 64 bit OS? Further: Say 32 bit hardware and 64 bit hardware, where both are running a 32 bit OS? Specifically speaking of RHEL. Thanks. -- Until later, Geoffrey "I predict future happiness for America if they can prevent the government from wasting the labors of the people under the pretense of taking care of them." - Thomas Jefferson
On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers <lists@serioustechnology.com> wrote: > 'In any case the hardware architecture must be the same — shipping from, > say, a 32-bit to a 64-bit system will not work.' > > Is this specific to the hardware? That is to say, can I use pitr wal > shipping from 64 bit hardware to 64 bit hardware, where one machine is > running a 32 bit OS and the other is running a 64 bit OS? > It applies to the OS. The OS determines the sizes of integers, padding alignment, etc. Running 32-bit OS on an amd64 class processor is the same as running it on a x86 class processor. Other processors (such as PowerPC) may behave differently, I don't know.
On 10/13/2010 11:30 AM, zhong ming wu wrote: > On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers > <lists@serioustechnology.com <mailto:lists@serioustechnology.com>> wrote: > > Excuse the ignorance, but I see the following in the docs: > > > > 'In any case the hardware architecture must be the same — shipping from, > > say, a 32-bit to a 64-bit system will not work.' > > postgres only sees the OS. It does not care what hardware you got. So > you must use the same type of OS: both 32 bit or both 64 bit. As I expected, thus the document should possibly be rephrased to indicate it's the OS not the physical hardware that is the issue. -- Until later, Geoffrey "I predict future happiness for America if they can prevent the government from wasting the labors of the people under the pretense of taking care of them." - Thomas Jefferson
Vick Khera <vivek@khera.org> writes: > On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers > <lists@serioustechnology.com> wrote: >>> 'In any case the hardware architecture must be the same � shipping from, >>> say, a 32-bit to a 64-bit system will not work.' >> Is this specific to the hardware? �That is to say, can I use pitr wal >> shipping from 64 bit hardware to 64 bit hardware, where one machine is >> running a 32 bit OS and the other is running a 64 bit OS? > It applies to the OS. The OS determines the sizes of integers, > padding alignment, etc. Running 32-bit OS on an amd64 class processor > is the same as running it on a x86 class processor. Other processors > (such as PowerPC) may behave differently, I don't know. It's not really the OS but the build of Postgres. Most 64-bit OSes are perfectly capable of running 32-bit executables. You can ship WAL from one machine running a 32-bit Postgres executable to another one running a 32-bit executable (of the same hardware architecture), regardless of whether the hardware or the OS is 64-bit-capable on either end. But you can't ship WAL between 32-bit and 64-bit executables. regards, tom lane
On Wed, 2010-10-13 at 11:40 -0400, Geoffrey Myers wrote: > On 10/13/2010 11:30 AM, zhong ming wu wrote: > > On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers > > <lists@serioustechnology.com <mailto:lists@serioustechnology.com>> wrote: > > > Excuse the ignorance, but I see the following in the docs: > > > > > > 'In any case the hardware architecture must be the same — shipping from, > > > say, a 32-bit to a 64-bit system will not work.' > > > > postgres only sees the OS. It does not care what hardware you got. So > > you must use the same type of OS: both 32 bit or both 64 bit. > > As I expected, thus the document should possibly be rephrased to > indicate it's the OS not the physical hardware that is the issue. No. Because PostgreSQL itself must also be the same architecture. Joshua D. Drake -- PostgreSQL.org Major Contributor Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579 Consulting, Training, Support, Custom Development, Engineering http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
On 14/10/10 00:18, Joshua D. Drake wrote: > On Wed, 2010-10-13 at 11:40 -0400, Geoffrey Myers wrote: >> On 10/13/2010 11:30 AM, zhong ming wu wrote: >>> On Wed, Oct 13, 2010 at 11:17 AM, Geoffrey Myers >>> <lists@serioustechnology.com <mailto:lists@serioustechnology.com>> wrote: >>> > Excuse the ignorance, but I see the following in the docs: >>> > >>> > 'In any case the hardware architecture must be the same — shipping from, >>> > say, a 32-bit to a 64-bit system will not work.' >>> >>> postgres only sees the OS. It does not care what hardware you got. So >>> you must use the same type of OS: both 32 bit or both 64 bit. >> >> As I expected, thus the document should possibly be rephrased to >> indicate it's the OS not the physical hardware that is the issue. > > No. Because PostgreSQL itself must also be the same architecture. No it doesn't. As Tom Lane pointed out, plenty plenty of 64-bit OSes on 64-bit hardware will run 32-bit binaries. Additionally, most 64-bit hardware will run 32-bit OSes with 32-bit binaries. So long as Pg has the same word sizes, endianness, etc, it won't care. This means that you can't log-ship from 32-bit Intel to 32-bit big-endian PPC and expect it to work, but you can log-ship from 32-bit Pg running on 64-bit Intel to 32-bit Pg running on 32-bit Intel and that'll be fine. -- Craig Ringer Tech-related writing: http://soapyfrogs.blogspot.com/