Re: PostgreSQL 9.0.2 hangs during shutdown on Windows (Win32)

From: Alexandros Karypidis <akarypid(at)yahoo(dot)gr>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL 9.0.2 hangs during shutdown on Windows (Win32)
Date: 2011-01-17 10:44:05
Message-ID: 878929.59956.qm@web28604.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Forgot to mention that:

1. After the shutdown request, I can see that there are still two processes
running (postgres.exe). One of the two is hogging the CPU (it uses one of the
two cores 100%, so it shows up as 50 on the task manager). The other seems to be
waiting, using 0%.

2. If I go to the command prompt where the server is running and hit Ctrl-C, the
following additional output is logged:

DEBUG: postmaster received signal 2
LOG: received fast shutdown request

Still, nothing happens.

3. If I kill the idle one of the two "stuck" postgress.exe via the task manager,
there is nothing additional logged by the server:

4. If I kill the busy one of the two "stuck" postgress.exe via the task
manager, the following output is additionally logged by the server:

DEBUG: reaping dead processes
LOG: statistics collector process (PID 4264) exited with exit code 1
DEBUG: shmem_exit(0): 2 callbacks to make
DEBUG: proc_exit(0): 1 callbacks to make
DEBUG: exit(0)
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make

5. On the client side (the command window where I ran that shutdown command:
pg_ctl stop -D %PGDATA_HOME%) I see:

waiting for server to shut
down............................................................... failed
pg_ctl: server does not shut down

----- Original Message ----
From: Alexandros Karypidis <akarypid(at)yahoo(dot)gr>
To: pgsql-general(at)postgresql(dot)org
Sent: Mon, January 17, 2011 12:28:05 PM
Subject: PostgreSQL 9.0.2 hangs during shutdown on Windows (Win32)

Hello,

I am using PostgreSQL 9.0.2-1 (specifically the pre-compiled ZIP distribution
for Win32, postgresql-9.0.2-1-windows-binaries.zip, from EnterpriseDB
http://www.enterprisedb.com/postgresql-902-binaries-win32?ls=Crossover&type=Crossover)

The Host is an Intel x86 (Core2Duo) machine running Windows XP SP3 (32-bit).

When I try to shut down the database, it always hangs. Even if I simply start
the DB and then issue a shutdown (with no connections being made and no SQL
executed in between) the DB still hangs. I appreciate any info on what to do to
resolve this.

I have increased the log level to DEBUG5 (log_min_messages and
log_min_error_statement) and the output of the server is:

------------------------- START DEBUG OUTPUT
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
DEBUG: InitPostgres
DEBUG: my backend id is 1
DEBUG: mapped win32 error code 2 to 2
DEBUG: StartTransaction
DEBUG: name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid:

0/1/0, nestlvl: 1, children:
DEBUG: CommitTransaction
DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid:

0/1/0, nestlvl: 1, children:
DEBUG: mapped win32 error code 2 to 2

===> ...Message above repeated several times

DEBUG: mapped win32 error code 2 to 2

===> This is where I immediately try a clean shutdown:

DEBUG: postmaster received signal 15
LOG: received smart shutdown request
LOG: autovacuum launcher shutting down
DEBUG: shmem_exit(0): 7 callbacks to make
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: shmem_exit(0): 4 callbacks to make
DEBUG: exit(0)
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: exit(0)
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: reaping dead processes
DEBUG: reaping dead processes
LOG: shutting down
DEBUG: attempting to remove WAL segments older than log file
000000010000000000000002
LOG: database system is shut down
DEBUG: shmem_exit(0): 4 callbacks to make
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: exit(0)
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: reaping dead processes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jensen Somers 2011-01-17 10:46:11 Re: Install PostgreSQL as part of a desktop application, but how to coop with existing installations?
Previous Message Jasen Betts 2011-01-17 10:39:42 Re: Trigger Performance