Thread: Trouble Getting Database Server Started
Trouble Getting Database Server Started
I'm no longer able to connect to the database with psql. PostgreSQL 8.0.0
was included as part of a software package I'm using to collect environmental
data. It is a very simple logging application - mostly a single simple table
with timestamp and 6 integers in each record and on the order of 50K records
over the past 3 weeks. I'm using version 8.0.0 on Windows XP Pro.
was included as part of a software package I'm using to collect environmental
data. It is a very simple logging application - mostly a single simple table
with timestamp and 6 integers in each record and on the order of 50K records
over the past 3 weeks. I'm using version 8.0.0 on Windows XP Pro.
The vendor install script for the application installs the database as a Win32 Service
to be launched when Windows boots up. I don't have access to the details of the
install procedure. It has been working fine for 3 weeks but one morning the computer
(I'll refer to it as Computer A) was found powered down and since then I've no
longer been able to connect to the database.
to be launched when Windows boots up. I don't have access to the details of the
install procedure. It has been working fine for 3 weeks but one morning the computer
(I'll refer to it as Computer A) was found powered down and since then I've no
longer been able to connect to the database.
I see from the Postgres archives that one can simply take a copy of the installed
PostgreSQL directory folder and move it in place of the PostsgreSQL folder on a
working system. I took another computer (Computer B) and ran the same installation
script and tested to verify I could connect with psql. Window's Task Manager showed
6 postgres processes: postmaster.exe, pg_ctl.exe, and 4 postgres.exe. (Not sure what
the 4 postgres.exe are for.)
PostgreSQL directory folder and move it in place of the PostsgreSQL folder on a
working system. I took another computer (Computer B) and ran the same installation
script and tested to verify I could connect with psql. Window's Task Manager showed
6 postgres processes: postmaster.exe, pg_ctl.exe, and 4 postgres.exe. (Not sure what
the 4 postgres.exe are for.)
I next replaced the PostgreSQL folder with the one from my Computer A holding my
collected data. After rebooting Computer B, Task Manager shows only postmaster.exe
and pg_ctl.exe. I still can't connect with psql.
collected data. After rebooting Computer B, Task Manager shows only postmaster.exe
and pg_ctl.exe. I still can't connect with psql.
Since I had a file system backup of Computer A from about a week prior when everything
was working fine, I tried to see if I could get the archived PostgreSQL directory to
work on Computer B. It also showed just postmaster.exe and pg_ctl.exe running and psql
could not connect either.
was working fine, I tried to see if I could get the archived PostgreSQL directory to
work on Computer B. It also showed just postmaster.exe and pg_ctl.exe running and psql
could not connect either.
I don't know what caused Computer A to power down. It is in a lab and someone may have
inadvertently cut the power. Would that corrupt the database to the point where I can't
connect to it or its startup mechanism be disrupted? I don't know what role those 4
postgres.exe processes fill - are they part of standard postgres startup? Secondly, I
don't know why sliding in the archived PostgreSQL folder on Computer B did not work.
inadvertently cut the power. Would that corrupt the database to the point where I can't
connect to it or its startup mechanism be disrupted? I don't know what role those 4
postgres.exe processes fill - are they part of standard postgres startup? Secondly, I
don't know why sliding in the archived PostgreSQL folder on Computer B did not work.
Please let me know if further details are required.
Thanks in advance for any help,
Dirk Kalp
Dirk Kalp
Hi Dirk: I have been seeing similar problems if PC pwered down rather than using the Windows shut down facility. In my case the user which suppose to start the service loses "Logon as service" right therefore service can not be started. On your computer A, check to see if the database service was started or not. If not then give the user which suppose to start the service "logon as service" rigth again and try to re-start the service. The service should start. Once the service is started your front end programe should be able to connect to backend database. Hope this helps. Karim > Trouble Getting Database Server Started > > I'm no longer able to connect to the database with psql. PostgreSQL 8.0.0 > was included as part of a software package I'm using to collect > environmental > data. It is a very simple logging application - mostly a single simple > table > with timestamp and 6 integers in each record and on the order of 50K > records > over the past 3 weeks. I'm using version 8.0.0 on Windows XP Pro. > > The vendor install script for the application installs the database as a > Win32 Service > to be launched when Windows boots up. I don't have access to the details > of the > install procedure. It has been working fine for 3 weeks but one morning > the computer > (I'll refer to it as Computer A) was found powered down and since then > I've no > longer been able to connect to the database. > > I see from the Postgres archives that one can simply take a copy of the > installed > PostgreSQL directory folder and move it in place of the PostsgreSQL folder > on a > working system. I took another computer (Computer B) and ran the same > installation > script and tested to verify I could connect with psql. Window's Task > Manager showed > 6 postgres processes: postmaster.exe, pg_ctl.exe, and 4 postgres.exe. (Not > sure what > the 4 postgres.exe are for.) > > I next replaced the PostgreSQL folder with the one from my Computer A > holding my > collected data. After rebooting Computer B, Task Manager shows only > postmaster.exe > and pg_ctl.exe. I still can't connect with psql. > > Since I had a file system backup of Computer A from about a week prior > when everything > was working fine, I tried to see if I could get the archived PostgreSQL > directory to > work on Computer B. It also showed just postmaster.exe and pg_ctl.exe > running and psql > could not connect either. > > I don't know what caused Computer A to power down. It is in a lab and > someone may have > inadvertently cut the power. Would that corrupt the database to the point > where I can't > connect to it or its startup mechanism be disrupted? I don't know what > role those 4 > postgres.exe processes fill - are they part of standard postgres startup? > Secondly, I > don't know why sliding in the archived PostgreSQL folder on Computer B did > not work. > > Please let me know if further details are required. > > Thanks in advance for any help, > Dirk Kalp > Regards, Karim Mardhani ZeeCore Consulting
> I see from the Postgres archives that one can simply take a > copy of the installed PostgreSQL directory folder and move it > in place of the PostsgreSQL folder on a working system. I > took another computer (Computer B) and ran the same > installation script and tested to verify I could connect with > psql. Window's Task Manager showed > 6 postgres processes: postmaster.exe, pg_ctl.exe, and 4 > postgres.exe. (Not sure what the 4 postgres.exe are for.) That's normal. It's one logger, one bgwriter and two stats processes. > I don't know what caused Computer A to power down. It is in a > lab and someone may have inadvertently cut the power. Would > that corrupt the database to the point where I can't connect > to it or its startup mechanism be disrupted? I don't know > what role those 4 postgres.exe processes fill - are they part > of standard postgres startup? Secondly, I don't know why > sliding in the archived PostgreSQL folder on Computer B did not work. It normally sholdn't. You'll need to look into your logs to see wha thave happened. Both the files in pg_log and in the system eventlog. //Magnus
Karim, Thanks for the suggestion. I did try to reset and then set the postgres user's rights to "Logon as a service" in both the Local Security Policy and Services tools of the Windows Control Panel. It did not make any difference. I suspect that that is not the problem since it appears that the server is initially being launched but does not complete. Thanks, Dirk ----- Original Message ----- From: "Karim Mardhani" <karim@zeecore.net> To: "Dirk Kalp" <dkalp@sensormgmt.com> Cc: <pgsql-admin@postgresql.org> Sent: Monday, August 08, 2005 11:16 AM Subject: Re: [ADMIN] Trouble Getting Database Server Started > Hi Dirk: > > I have been seeing similar problems if PC pwered down rather than using > the Windows shut down facility. > > In my case the user which suppose to start the service loses "Logon as > service" right therefore service can not be started. > > On your computer A, check to see if the database service was started or > not. If not then give the user which suppose to start the service > "logon as service" rigth again and try to re-start the service. The > service should start. Once the service is started your front end > programe should be able to connect to backend database. > > Hope this helps. > > Karim > > >> Trouble Getting Database Server Started >> >> I'm no longer able to connect to the database with psql. PostgreSQL 8.0.0 >> was included as part of a software package I'm using to collect >> environmental >> data. It is a very simple logging application - mostly a single simple >> table >> with timestamp and 6 integers in each record and on the order of 50K >> records >> over the past 3 weeks. I'm using version 8.0.0 on Windows XP Pro. >> >> The vendor install script for the application installs the database as a >> Win32 Service >> to be launched when Windows boots up. I don't have access to the details >> of the >> install procedure. It has been working fine for 3 weeks but one morning >> the computer >> (I'll refer to it as Computer A) was found powered down and since then >> I've no >> longer been able to connect to the database. >> >> I see from the Postgres archives that one can simply take a copy of the >> installed >> PostgreSQL directory folder and move it in place of the PostsgreSQL >> folder >> on a >> working system. I took another computer (Computer B) and ran the same >> installation >> script and tested to verify I could connect with psql. Window's Task >> Manager showed >> 6 postgres processes: postmaster.exe, pg_ctl.exe, and 4 postgres.exe. >> (Not >> sure what >> the 4 postgres.exe are for.) >> >> I next replaced the PostgreSQL folder with the one from my Computer A >> holding my >> collected data. After rebooting Computer B, Task Manager shows only >> postmaster.exe >> and pg_ctl.exe. I still can't connect with psql. >> >> Since I had a file system backup of Computer A from about a week prior >> when everything >> was working fine, I tried to see if I could get the archived PostgreSQL >> directory to >> work on Computer B. It also showed just postmaster.exe and pg_ctl.exe >> running and psql >> could not connect either. >> >> I don't know what caused Computer A to power down. It is in a lab and >> someone may have >> inadvertently cut the power. Would that corrupt the database to the point >> where I can't >> connect to it or its startup mechanism be disrupted? I don't know what >> role those 4 >> postgres.exe processes fill - are they part of standard postgres startup? >> Secondly, I >> don't know why sliding in the archived PostgreSQL folder on Computer B >> did >> not work. >> >> Please let me know if further details are required. >> >> Thanks in advance for any help, >> Dirk Kalp >> > > > Regards, > > Karim Mardhani > ZeeCore Consulting > > >
Magnus, Thanks for the advice. I checked the Windows Event Logs and did not see anything there meaningful. The pg_log had only one interesting msg "incomplete startup packet" in one of the logs a couple days before Computer A had powered down. I don't know what this log msg means but I assume it is not the cause. But I'm neither a database expert or a Windows expert so I could be wrong. Thanks, Dirk ----- Original Message ----- From: "Magnus Hagander" <mha@sollentuna.net> To: "Dirk Kalp" <dkalp@sensormgmt.com>; <pgsql-admin@postgresql.org> Sent: Wednesday, August 10, 2005 3:23 PM Subject: RE: [ADMIN] Trouble Getting Database Server Started > I see from the Postgres archives that one can simply take a > copy of the installed PostgreSQL directory folder and move it > in place of the PostsgreSQL folder on a working system. I > took another computer (Computer B) and ran the same > installation script and tested to verify I could connect with > psql. Window's Task Manager showed > 6 postgres processes: postmaster.exe, pg_ctl.exe, and 4 > postgres.exe. (Not sure what the 4 postgres.exe are for.) That's normal. It's one logger, one bgwriter and two stats processes. > I don't know what caused Computer A to power down. It is in a > lab and someone may have inadvertently cut the power. Would > that corrupt the database to the point where I can't connect > to it or its startup mechanism be disrupted? I don't know > what role those 4 postgres.exe processes fill - are they part > of standard postgres startup? Secondly, I don't know why > sliding in the archived PostgreSQL folder on Computer B did not work. It normally sholdn't. You'll need to look into your logs to see wha thave happened. Both the files in pg_log and in the system eventlog. //Magnus