pg_ctl {start,restart,reload} bad handling of stdout file descriptor - Mailing list pgsql-hackers

From Luis Menina
Subject pg_ctl {start,restart,reload} bad handling of stdout file descriptor
Date
Msg-id CAC4O4H-xHChwKuKdN15SruDHxf7gQ7aNJ598_1FwtAYWPiv1oA@mail.gmail.com
Whole thread Raw
Responses Re: pg_ctl {start,restart,reload} bad handling of stdout file descriptor  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I've been trying to run some pg_ctl command inside a python script,
and saw that some of them where deadlocking. It seems that the
commands that start postgres handle stdout in a way that that block
the caller. Redirecting stdout to /dev/null or to a file using the -l
option allow me to workaround the problem, but fixing it upstream
would be nice.

Here's a simple python program that reproduces the problem, and should deadlock.
Customize your data path first, of course.

Regards,
--
Luis MENINA / Software Engineer
Web: www.anevia.com
Anevia: 1 rue René Anjolvy, 94250 Gentilly, France

Attachment

pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: [GENERAL] ON_ERROR_ROLLBACK
Next
From: Luis Menina
Date:
Subject: Re: pg_ctl {start,restart,reload} bad handling of stdout file descriptor