BUG #4063: psql locks up on pager during dump restore

Поиск
Список
Период
Сортировка
От John Whitley
Тема BUG #4063: psql locks up on pager during dump restore
Дата
Msg-id 200803262212.m2QMCojG088947@wwwmaster.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4063
Logged by:          John Whitley
Email address:      jwhitley@tableausoftware.com
PostgreSQL version: 8.3.0
Operating system:   Windows XP SP2, Windows Server 2k3
Description:        psql locks up on pager during dump restore
Details:

On at least Windows XP SP2 and Windows Server 2k3, psql is locking up during
a restore of a pg_dumpall dump from a Postgres 8.1 installation.  The lockup
appears to be input dependent, in that it recurs on the same line of the
backup repeatably.  The root cause appears to be related to psql invoking
the pager.  Symptoms as observed via ProcessExplorer are that psql.exe
repeatedly spawns cmd.exe instances which in turn spawn the pager
(more.com).

The initial command line attempted is:

C:\path\to\psql -X -q -h <host> -p <port> -U <user> -f backup.sql postgres

As one would expect, the variant of more found doesn't matter.  E.g. psql
might pick up Windows' more.com or Cygwin's more.exe, depending on PATH
settings but either one will participate happily in locking up psql.

Surprisingly, turning off paging via pset doesn't work; it locks up
identically to the above, but only spawning cmd.exe instances and not the
more.com subprocesses.  That command line is:

C:\path\to\psql -X -q -h <host> -p <port> -U <user> --pset pager=off -f
backup.sql postgres

The only successful workaround I've found is to use the first command line
with PATH unset.  What appears to happen is that psql spawns the cmd.exe
subprocess, but can't find the pager.. but runs to completion anyway.

Last but not least, all of this reproduces with psql from Postgres 8.1 as
well.  I presume that we didn't encounter this issue before since we changed
the run context of our restore process at the 8.1 -> 8.3 transition from
running under a Windows service to running as a (usually administrator
group) normal user.

NOTE: I am able to provide the dump file that reproduces this bug upon
request.  Please contact me at my address listed above as needed
(jwhitley@tableausoftware.com)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Taiki Yamaguchi
Дата:
Сообщение: DISTINCT MAX() results mismatch on 8.2 and 8.3
Следующее
От: "saturn five"
Дата:
Сообщение: BUG #4064: the 'PostgreSQL Database Server 8.3' service auto shutdown