Skip site navigation (1) Skip section navigation (2)

Re: Hung postmaster (8.3.9)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hung postmaster (8.3.9)
Date: 2010-03-02 04:37:01
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-hackers
"Ed L." <pgsql(at)bluepolka(dot)net> writes:
> On Monday 01 March 2010 @ 17:57, Tom Lane wrote:
>> BTW, there seems to be some other contributing factor here
>> besides the weird username, because I don't see any looping
>> when I try CREATE USER "@".  What's your platform exactly,
>> and what type of filesystem is $PGDATA on?

> This is CentOS 5.2, Linux 2.6.18-92.1.22.el5 #1 SMP x86_64 
> GNU/Linux.

Ah.  I can reproduce it on my Fedora box.  The infinite loop is because
feof never returns 1 when reading from a directory.  I think this is a
glibc bug and have filed it accordingly:
but IME the glibc boys can be pretty stubborn about acknowledging that
corner cases in their code are actually bugs.  We shall see.

In the meantime, it seems like we ought to take two defensive steps:
prevent a quoted @ from being considered as an include introducer,
and prevent @ with no additional text from being considered as an
inclusion reference no matter what.  What the current code is doing
is seeing "@" as an include file reference with empty include name,
and by the time canonicalize_file is done with it this ends up as
a reference to the $PGDATA/global directory itself.  Which Fedora
allows us to open and read, but it reads as an infinite sequence
of EOF characters because feof never succeeds.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2010-03-02 04:54:04
Subject: Re: Re: Hot Standby query cancellation and Streaming Replication integration
Previous:From: Bruce MomjianDate: 2010-03-02 03:36:44
Subject: Re: [GENERAL] trouble with to_char('L')

pgsql-general by date

Next:From: Adrian von BidderDate: 2010-03-02 07:49:13
Subject: Re: Optimizer: ranges and partial indices? Or use partitioning?
Previous:From: Bruce MomjianDate: 2010-03-02 03:36:44
Subject: Re: [GENERAL] trouble with to_char('L')

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group