Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread Scott Marlowe
On Dec 20, 2007 2:04 PM, Sean Z. <[EMAIL PROTECTED]> wrote:
>
> Sorry I am not familiar with hyperic.  Do you mean I can use hyperic to do
> the job, or do you mean I can take the same approach as hyperic?

I mean you can take the same approach as them.

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread Dave Page
Harald Armin Massa wrote:
> HKLM\Software\PostgreSQL\Services\\Service Account
> 
> Where:
> 
> [...]
> Service account is the Windows user account that the pg_ctl service runs
> under, eg. MYPC\postgres
> 
> 
> I guess that would be "service account that was assigned to the postgres
> service during installation", and that that key does NOT get updated on
> changes via services.msc, or?

Yes, thats true. The values are those selected at install time. If
you've changed them yourself, that data may be out of date.

/D

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread Harald Armin Massa
>
> HKLM\Software\PostgreSQL\Services\\Service Account
>
> Where:
>
> [...]
> Service account is the Windows user account that the pg_ctl service runs
> under, eg. MYPC\postgres
>

I guess that would be "service account that was assigned to the postgres
service during installation", and that that key does NOT get updated on
changes via services.msc, or?

Harald



-- 
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
fx 01212-5-13695179
-
EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!


Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread mgainty
Hi Sean

take a look at port specification in postgresql.conf
$PGDATA/postgresql.conf 
port =

Anyone else?
Martin
  - Original Message - 
  Wrom: JVTLBXFGGM
  To: Scott Marlowe 
  Cc: pgsql-general@postgresql.org 
  Sent: Thursday, December 20, 2007 3:00 PM
  Subject: Re: [GENERAL] Deploy postgres - upgrade strategy


  BTW, what's the best way to determine the installation folder, port number 
used by an existing postgres server? From registry 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations ?


  - Original Message 
  Wrom: EPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAU
  To: Sean Z. <[EMAIL PROTECTED]>
  Cc: pgsql-general@postgresql.org
  Sent: Wednesday, December 19, 2007 1:04:19 PM
  Subject: Re: [GENERAL] Deploy postgres - upgrade strategy

  On Dec 19, 2007 11:12 AM, Sean Z. <[EMAIL PROTECTED]> wrote:
  >
  > Hi,
  >
  > I need your kind advice on postgres deployment strategy.  My application is
  > developed on 8.2.4 and need to be deployed to Windows server 2003. Clients
  > may /may not have postgres installed.  How can I deploy postgres silently on
  > client machine?  Specifically:
  >
  > 3. If there is an older version of the same version line (e.g., 8.2.3)
  > installed, is it safe for me to upgrade it by running upgrade.bat, believing
  > that it won't break existing application using the old version?

  Under no circumstances should you simply do it.  You should ask the
  user if it's ok to do it.  If I had a machine running a specific
  version because that's what I'd tested and was deployed in other
  places, and it got updated by some other app being installed I would
  not be happy.

  > 4. If there is a newer version installed (e.g. 8.3), can I still install
  > 8.2.4 as a separate installation without touching the existing installation?

  That may be your best bet if you're looking to use postgresql and your
  app together as a kind of "bolted together" application.

  I'd say that you should ask the user up front if they have another
  postgresql server (it might not be on the same machine you're
  installing your app on, btw) they want to use, or if they'd like you
  to install a postgresql instance just for your application on the
  local machine.  Then make all decisions based on that one question.





--
  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread Dave Page
Sean Z. wrote:
> BTW, what's the best way to determine the installation folder, port
> number used by an existing postgres server? From registry
> HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations ?

Yes. From a related doc I once wrote:

When PostgreSQL is installed on Windows it adds a number of entries to
the registry to allow pgAdmin and other applications to discover the
installation and make use of it automatically. This system is being used
further by the application stack builder project that I've been working on.

The following registry keys are added:

HKLM\Software\PostgreSQL\Installations\\Base Directory
HKLM\Software\PostgreSQL\Installations\\Data Directory
HKLM\Software\PostgreSQL\Installations\\Service ID
HKLM\Software\PostgreSQL\Installations\\Version

HKLM\Software\PostgreSQL\Services\\Data Directory
HKLM\Software\PostgreSQL\Services\\Database Superuser
HKLM\Software\PostgreSQL\Services\\Display Name
HKLM\Software\PostgreSQL\Services\\Encoding
HKLM\Software\PostgreSQL\Services\\Locale
HKLM\Software\PostgreSQL\Services\\Port
HKLM\Software\PostgreSQL\Services\\Product Code
HKLM\Software\PostgreSQL\Services\\Service Account

Where:

Product Code is the product code GUID used in the installer package.
This changes between major versions (ie. 8.1 -> 8.2).

Base directory is the base installation directory, eg. C:\PostgreSQL\8.1

Data directory is the data directory, eg. C:\PostgreSQL\8.1\data

Service ID is the identifier of the pg_ctl registration with the service
control manager, eg. pgsql-8.1

Version is the major.minor version, e.g. 8.1

Database superuser is the name of the initial superuser in the cluster,
eg. postgres

Display name is the friendly name of the pg_ctl registration with the
service control manager, eg. PostgreSQL Database Server (8.1)

Encoding is the database encoding set at initdb, eg. LATIN1

Locale is the server locale set at installation, eg. English_United Kingdom

Port is a DWORD value representing the port the server listens on, eg. 5432

Service account is the Windows user account that the pg_ctl service runs
under, eg. MYPC\postgres

The values are split into two sets of keys (with some duplication) to
allow easy cross-referencing from service to installation and vice
versa. Obviously  and  in the key paths should
be replaced with the actual values.


Regards, Dave.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread Sean Z.
Sorry I am not familiar with hyperic.  Do you mean I can use hyperic to do the 
job, or do you mean I can take the same approach as hyperic?

- Original Message 
From: Scott Marlowe <[EMAIL PROTECTED]>
To: Sean Z. <[EMAIL PROTECTED]>
Cc: pgsql-general@postgresql.org
Sent: Wednesday, December 19, 2007 3:24:09 PM
Subject: Re: [GENERAL] Deploy postgres - upgrade strategy


On Dec 19, 2007 1:55 PM, Sean Z. <[EMAIL PROTECTED]> wrote:
>
> Yes, "bolted together" application is something I am thinking about.
  It
> will satisfied my application's requirement and it won't affect
 existing
> applications.
>
> So is it possible to install my postgres server (say 8.2.4)
 regardless of
> whether there is a postgres server of any version existing on the
 same
> windows box?

Yes it is.  Take a look at hyperic, they do that.  Note that if you
are gonna include a version of postgresql with your application, you
should make it an option, as sometimes folks would rather use their
one big pgsql server for such things than having yet another odd copy
running around.  Hyperic makes it very easy to switch from using their
pgsql to your own.  They install their copy on port 9432 instead of
5432, and all you have to do it edit the jdbc connect line to point at
your own pg server and create a db and user to match hyperic's and
you're done.






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-20 Thread Sean Z.
BTW, what's the best way to determine the installation folder, port number used 
by an existing postgres server? From registry 
HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installations ?

- Original Message 
From: Scott Marlowe <[EMAIL PROTECTED]>
To: Sean Z. <[EMAIL PROTECTED]>
Cc: pgsql-general@postgresql.org
Sent: Wednesday, December 19, 2007 1:04:19 PM
Subject: Re: [GENERAL] Deploy postgres - upgrade strategy


On Dec 19, 2007 11:12 AM, Sean Z. <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I need your kind advice on postgres deployment strategy.  My
 application is
> developed on 8.2.4 and need to be deployed to Windows server 2003.
 Clients
> may /may not have postgres installed.  How can I deploy postgres
 silently on
> client machine?  Specifically:
>
> 3. If there is an older version of the same version line (e.g.,
 8.2.3)
> installed, is it safe for me to upgrade it by running upgrade.bat,
 believing
> that it won't break existing application using the old version?

Under no circumstances should you simply do it.  You should ask the
user if it's ok to do it.  If I had a machine running a specific
version because that's what I'd tested and was deployed in other
places, and it got updated by some other app being installed I would
not be happy.

> 4. If there is a newer version installed (e.g. 8.3), can I still
 install
> 8.2.4 as a separate installation without touching the existing
 installation?

That may be your best bet if you're looking to use postgresql and your
app together as a kind of "bolted together" application.

I'd say that you should ask the user up front if they have another
postgresql server (it might not be on the same machine you're
installing your app on, btw) they want to use, or if they'd like you
to install a postgresql instance just for your application on the
local machine.  Then make all decisions based on that one question.






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Scott Marlowe
On Dec 19, 2007 1:55 PM, Sean Z. <[EMAIL PROTECTED]> wrote:
>
> Yes, "bolted together" application is something I am thinking about.  It
> will satisfied my application's requirement and it won't affect existing
> applications.
>
> So is it possible to install my postgres server (say 8.2.4) regardless of
> whether there is a postgres server of any version existing on the same
> windows box?

Yes it is.  Take a look at hyperic, they do that.  Note that if you
are gonna include a version of postgresql with your application, you
should make it an option, as sometimes folks would rather use their
one big pgsql server for such things than having yet another odd copy
running around.  Hyperic makes it very easy to switch from using their
pgsql to your own.  They install their copy on port 9432 instead of
5432, and all you have to do it edit the jdbc connect line to point at
your own pg server and create a db and user to match hyperic's and
you're done.

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Sean Z.
Yes, "bolted together" application is something I am thinking about.  It will 
satisfied my application's requirement and it won't affect existing 
applications.

So is it possible to install my postgres server (say 8.2.4) regardless of 
whether there is a postgres server of any version existing on the same windows 
box?

- Original Message 
From: Scott Marlowe <[EMAIL PROTECTED]>
To: Sean Z. <[EMAIL PROTECTED]>
Cc: pgsql-general@postgresql.org
Sent: Wednesday, December 19, 2007 1:04:19 PM
Subject: Re: [GENERAL] Deploy postgres - upgrade strategy


On Dec 19, 2007 11:12 AM, Sean Z. <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I need your kind advice on postgres deployment strategy.  My
 application is
> developed on 8.2.4 and need to be deployed to Windows server 2003.
 Clients
> may /may not have postgres installed.  How can I deploy postgres
 silently on
> client machine?  Specifically:
>
> 3. If there is an older version of the same version line (e.g.,
 8.2.3)
> installed, is it safe for me to upgrade it by running upgrade.bat,
 believing
> that it won't break existing application using the old version?

Under no circumstances should you simply do it.  You should ask the
user if it's ok to do it.  If I had a machine running a specific
version because that's what I'd tested and was deployed in other
places, and it got updated by some other app being installed I would
not be happy.

> 4. If there is a newer version installed (e.g. 8.3), can I still
 install
> 8.2.4 as a separate installation without touching the existing
 installation?

That may be your best bet if you're looking to use postgresql and your
app together as a kind of "bolted together" application.

I'd say that you should ask the user up front if they have another
postgresql server (it might not be on the same machine you're
installing your app on, btw) they want to use, or if they'd like you
to install a postgresql instance just for your application on the
local machine.  Then make all decisions based on that one question.






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Scott Marlowe
On Dec 19, 2007 11:12 AM, Sean Z. <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I need your kind advice on postgres deployment strategy.  My application is
> developed on 8.2.4 and need to be deployed to Windows server 2003. Clients
> may /may not have postgres installed.  How can I deploy postgres silently on
> client machine?  Specifically:
>
> 3. If there is an older version of the same version line (e.g., 8.2.3)
> installed, is it safe for me to upgrade it by running upgrade.bat, believing
> that it won't break existing application using the old version?

Under no circumstances should you simply do it.  You should ask the
user if it's ok to do it.  If I had a machine running a specific
version because that's what I'd tested and was deployed in other
places, and it got updated by some other app being installed I would
not be happy.

> 4. If there is a newer version installed (e.g. 8.3), can I still install
> 8.2.4 as a separate installation without touching the existing installation?

That may be your best bet if you're looking to use postgresql and your
app together as a kind of "bolted together" application.

I'd say that you should ask the user up front if they have another
postgresql server (it might not be on the same machine you're
installing your app on, btw) they want to use, or if they'd like you
to install a postgresql instance just for your application on the
local machine.  Then make all decisions based on that one question.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Magnus Hagander
Sean Z. wrote:
> Hi,
> 
> I need your kind advice on postgres deployment strategy.  My application
> is developed on 8.2.4 and need to be deployed to Windows server 2003.
> Clients may /may not have postgres installed.  How can I deploy postgres
> silently on client machine?  Specifically:
> 
> 1. How to determine if postgres is installed on Win2K3, and what's its
> version?

You can probe the port if you want to catch any kind. If you're only
interested in official MSI installs, you can check the registry (there's
a key under HKLM\Software\PostgreSQL IIRC)


> 2. If there is an older version (e.g., 8.1) installed, can I install a
> new version (8.2.4) without touching the existing installation?

Yes.


> 3. If there is an older version of the same version line (e.g., 8.2.3)
> installed, is it safe for me to upgrade it by running upgrade.bat,
> believing that it won't break existing application using the old version?

Normally, yes. You might want to check the release notes if there is any
incompatibility, but we usually do whatever possible to avoid those
between minor releases.


> 4. If there is a newer version installed (e.g. 8.3), can I still install
> 8.2.4 as a separate installation without touching the existing installation?

Yes. You can always have the different major versions on the same
system. You just can't have >1 different *minor* version on the same
system if you use the official MSI - if you install it manually, there
is no restriction at all.


> 5. If there is a newer version of the same version line (e.g. 8.2.5)
> installed, shall I simply use it? (same as 3 I guess)

Probably. Depends on if you want your application to be entirelyi
independent or not.


//Magnus

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] Deploy postgres - upgrade strategy

2007-12-19 Thread Sean Z.
Hi,

I need your kind advice on postgres deployment strategy.  My application is 
developed on 8.2.4 and need to be deployed to Windows server 2003. Clients may 
/may not have postgres installed.  How can I deploy postgres silently on client 
machine?  Specifically:

1. How to determine if postgres is installed on Win2K3, and what's its version?

2. If there is an older version (e.g., 8.1) installed, can I install a new 
version (8.2.4) without touching the existing installation?

3. If there is an older version of the same version line (e.g., 8.2.3) 
installed, is it safe for me to upgrade it by running upgrade.bat, believing 
that it won't break existing application using the old version?

4. If there is a newer version installed (e.g. 8.3), can I still install 8.2.4 
as a separate installation without touching the existing installation?

5. If there is a newer version of the same version line (e.g. 8.2.5) installed, 
shall I simply use it? (same as 3 I guess)

If silent installation command can be provided, that will be great. My fresh 
installation command is like:

msiexec /i postgresql-8.2-int.msi  /qr INTERNALLAUNCH=1 
ADDLOCAL=server,psql,pgadmin,npgsql SERVICEDOMAIN="%COMPUTERNAME%" 
SERVICEPASSWORD="SecretWindowsPassword123" CREATESERVICEUSER=1 
SUPERPASSWORD="postgres" BASEDIR="C:\Program Files\PostgreSQL" 
DATADIR="e:\PostgreSQL.DATA"


Thanks a lot!
Sean




  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs