There is probably a better way of doing this, but if nothing else try this:
PostgreSQL executables on Unix:
% file postmaster psql
postmaster: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
psql: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
Checking on the UNIX platform:
AIX:
getconf HARDWARE_BITMODE
getconf KERNEL_BITMODE
HP-UX:
getconf KERNEL_BITS (returns 54 on a 64-bit machine, “Invalid argument” on a 32-bit machine)
Linux:
uname -a (you’ll see i386 on a 32-bit machine, x86_64 on a 64-bit machine)
Solaris:
isainfo –v (post Solaris 2.7)
Hope it helps,
Michael.
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Keaton Adams
Sent: Friday, April 18, 2008 11:30 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] How to tell if 64 bit vs 32 bit engine?
I did search the archives for this.... But didn’t see a posting that directly answered the question.
How do I tell if the 32 bit version of PostgreSQL is running on a 64 bit machine, or if the 64 bit version was installed? Is there a pg_ table that I can query or a config file I can look in to find out? I found nothing in postgresql.conf that would indicate this.
Thanks,
Keaton