Обсуждение: Best way to install postgres? RPM/Source Code Build

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

Best way to install postgres? RPM/Source Code Build

От
DM
Дата:
Hi All,

What is the best way to Install postgres database?

We have installed (2) versions of the postgres on th server using source code (compiling and building) (/usr/local/pgsql/8.3.3/ and /usr/local/pgsql/8.3.6/) and our data directory is (/mnt/data/pgsql/)
Our database size is more than 100GB. Currently we are running 8.3.6. When we upgraded from 8.3.3 to 8.3.6, we pointed the data directory of 8.3.3 to 8.3.6.

Ops team want to install postgres as (usr/local/bin) using RPM, and want to keep the data directory under (/var/lib/data/pgsql) and they say that we cannot have two versions at the same time using RPM.
They say that red hat standard is to install all binaries of the database under /usr/local/bin and by using RPM only.

What is the best way to install postgres? Is it by RPM or using Source code (Build). Could postgres experts comment on this please.

Thanks
Deepak


Re: [GENERAL] Best way to install postgres? RPM/Source Code Build

От
John R Pierce
Дата:
DM wrote:
> Hi All,
>
> What is the best way to Install postgres database?
>
> We have installed (2) versions of the postgres on th server using
> source code (compiling and building) (/usr/local/pgsql/8.3.3/ and
> /usr/local/pgsql/8.3.6/) and our data directory is (/mnt/data/pgsql/)
> Our database size is more than 100GB. Currently we are running 8.3.6.
> When we upgraded from 8.3.3 to 8.3.6, we pointed the data directory of
> 8.3.3 to 8.3.6.
>
> Ops team want to install postgres as (usr/local/bin) using RPM, and
> want to keep the data directory under (/var/lib/data/pgsql) and they
> say that we cannot have two versions at the same time using RPM.
> They say that red hat standard is to install all binaries of the
> database under /usr/local/bin and by using RPM only.
>
> What is the best way to install postgres? Is it by RPM or using Source
> code (Build). Could postgres experts comment on this please.

actually, the redhat RPM standard is to intsall the binaries in /usr/bin
and libraries in /usr/lib and so forth, and the postgres data is in
/var/lib/pgsql/data   ....

however, if you build your own RPMs, you can build it any way you
want.    upgrading 8.3.x to 8.3.y generally does NOT require any sort of
dump/restore, just stop the server, upgrade the binaries, restart the
server and move on.

I for one use the PGDG yum rpm repository, and install the 8.3 on top of
the default rhel/centos 4 or 5 binaries.   the repository includes a
compatibility library which satisfies RPM dependencies on the original
RHEL versions of the libpq.so ...



Re: Best way to install postgres? RPM/Source Code Build

От
Scott Marlowe
Дата:
On Tue, Apr 28, 2009 at 6:00 PM, DM <dm.aeqa@gmail.com> wrote:
> Hi All,
> What is the best way to Install postgres database?
> We have installed (2) versions of the postgres on th server using source
> code (compiling and building) (/usr/local/pgsql/8.3.3/ and
> /usr/local/pgsql/8.3.6/) and our data directory is (/mnt/data/pgsql/)
> Our database size is more than 100GB. Currently we are running 8.3.6. When
> we upgraded from 8.3.3 to 8.3.6, we pointed the data directory of 8.3.3 to
> 8.3.6.
> Ops team want to install postgres as (usr/local/bin) using RPM, and want to
> keep the data directory under (/var/lib/data/pgsql) and they say that we
> cannot have two versions at the same time using RPM.
> They say that red hat standard is to install all binaries of the database
> under /usr/local/bin and by using RPM only.
> What is the best way to install postgres? Is it by RPM or using Source code
> (Build). Could postgres experts comment on this please.

If you need > 1 version at the same time on the same machine with
rpms, then source code is preferred.  If you're running a debian or
debian derived OS (ubuntu etc) then you CAN have > 1 version, but only
major versions.  i.e. 8.2.11 and 8.3.7, but not 8.3.3 and 8.3.7.  But
there's not usually a great need for > 1 minor version so no great
loss.

On in house testing servers it can be handy to have multiple minor
versions for testing, and in that case installing from source is
preferred.  For big production machines, you should already have a
plan in place for upgrading so that you usually don't need multiple
minor or even major versions there.

Performance wise there's no real difference.

Re: [GENERAL] Best way to install postgres? RPM/Source Code Build

От
Scott Marlowe
Дата:
On Tue, Apr 28, 2009 at 6:08 PM, John R Pierce <pierce@hogranch.com> wrote:
> I for one use the PGDG yum rpm repository, and install the 8.3 on top of the
> default rhel/centos 4 or 5 binaries.   the repository includes a
> compatibility library which satisfies RPM dependencies on the original RHEL
> versions of the libpq.so ...

This is what I do too.  Run Centos 5.2 in production and the PGDG
8.3.x rpms have been wonderful.

Re: Best way to install postgres? RPM/Source Code Build

От
"Joshua D. Drake"
Дата:
>
> Ops team want to install postgres as (usr/local/bin) using RPM, and
> want to keep the data directory under (/var/lib/data/pgsql) and they
> say that we cannot have two versions at the same time using RPM.
> They say that red hat standard is to install all binaries of the
> database under /usr/local/bin and by using RPM only.

They are wrong. Redhat standard is /usr/bin for
binaries /var/lib/pgsql/data for the data directory.

Use www.pgsqlrpms.org and make your life easy.

Joshua D. Drake

Joshua D. Drake
>
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
   Consulting, Development, Support, Training
   503-667-4564 - http://www.commandprompt.com/
   The PostgreSQL Company, serving since 1997


Re: Best way to install postgres? RPM/Source Code Build

От
DM
Дата:
Thank you guys for the answers.

On Tue, Apr 28, 2009 at 6:06 PM, Joshua D. Drake <jd@commandprompt.com> wrote:

>
> Ops team want to install postgres as (usr/local/bin) using RPM, and
> want to keep the data directory under (/var/lib/data/pgsql) and they
> say that we cannot have two versions at the same time using RPM.
> They say that red hat standard is to install all binaries of the
> database under /usr/local/bin and by using RPM only.

They are wrong. Redhat standard is /usr/bin for
binaries /var/lib/pgsql/data for the data directory.

Use www.pgsqlrpms.org and make your life easy.

Joshua D. Drake

Joshua D. Drake
>
--
PostgreSQL - XMPP: jdrake@jabber.postgresql.org
  Consulting, Development, Support, Training
  503-667-4564 - http://www.commandprompt.com/
  The PostgreSQL Company, serving since 1997