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
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
Keaton Adams írta:
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
select version();
It will tell you the compiler version and arch as well. You can deduce
from there.
--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/
Zoltan Boszormenyi <zb@cybertec.at> writes:
Keaton Adams �rta:
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?
select version();
It will tell you the compiler version and arch as well. You can deduce
from there.
Or, if that doesn't seem very helpful, file(1) applied to the postgres
executable will tell you if it's a 32-bit or 64-bit executable.
regards, tom lane
Zoltan Boszormenyi wrote:
select version();
It will tell you the compiler version and arch as well. You can deduce
from there.
That approach is not reliable. I often build and run a 32-bit build of
PostgreSQL on a machine that claims to be something like
x86_64-unknown-linux-gnu.
On Fri, 18 Apr 2008 17:30:18 +0200, Keaton Adams <kadams@mxlogic.com>
wrote:
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
--
----------------------------------------------------------------------------
http://www.gispunkt.de - http://maps.gispunkt.de
----------------------------------------------------------------------------
On 4月21日, 上午1时35分, pete...@gmx.net (Peter Eisentraut) wrote:
Zoltan Boszormenyi wrote:
select version();
It will tell you the compiler version and arch as well. You can deduce
from there.That approach is not reliable. I often build and run a 32-bit build of
PostgreSQL on a machine that claims to be something like
x86_64-unknown-linux-gnu.--
Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general
At the client side as libpq, `select version()' is the best solution
now.
It seems a good idea to let the backend support a GUC parameter like
those used in Linux/UNIX.