BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install

Lists: pgsql-bugs
From: "Daniel Grace" <dgrace(at)wingsnw(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install
Date: 2011-05-04 19:19:13
Message-ID: 201105041919.p44JJDtG099589@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 6005
Logged by: Daniel Grace
Email address: dgrace(at)wingsnw(dot)com
PostgreSQL version: 9.1-beta1
Operating system: Win7 x64 (x86 postgres)
Description: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster
on a fresh install
Details:

While trying to restore a database created under 9.1 alpha (created with
pg_dumpall):

CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN
REPLICATION PASSWORD 'xxxx';
CREATE ROLE foo;
ALTER ROLE foo WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN
NOREPLICATION VALID UNTIL 'infinity';

The final statement causes postmaster to crash. I attempted it again
breaking each part of the ALTER ROLE into individual statements, e.g.
ALTER ROLE foo WITH NOSUPERUSER;
ALTER ROLE foo WITH INHERIT;
...

and it was the ALTER ROLE foo VALID UNTIL 'infinity' line causing the crash.


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Grace" <dgrace(at)wingsnw(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install
Date: 2011-05-04 20:39:36
Message-ID: 17180.1304541576@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"Daniel Grace" <dgrace(at)wingsnw(dot)com> writes:
> Bug reference: 6005
> Logged by: Daniel Grace
> Email address: dgrace(at)wingsnw(dot)com
> PostgreSQL version: 9.1-beta1
> Operating system: Win7 x64 (x86 postgres)
> Description: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster
> on a fresh install
> Details:

> While trying to restore a database created under 9.1 alpha (created with
> pg_dumpall):

> CREATE ROLE postgres;
> ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN
> REPLICATION PASSWORD 'xxxx';
> CREATE ROLE foo;
> ALTER ROLE foo WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN
> NOREPLICATION VALID UNTIL 'infinity';

> The final statement causes postmaster to crash.

Hmm, cannot duplicate this here ... can anyone else? Windows-specific
issue perhaps?

regards, tom lane


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniel Grace <dgrace(at)wingsnw(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install
Date: 2011-05-11 19:59:17
Message-ID: BANLkTinKbQtpB-Jg9a=Z4bFhcQoL5r6tXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, May 4, 2011 at 4:39 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Daniel Grace" <dgrace(at)wingsnw(dot)com> writes:
>> Bug reference:      6005
>> Logged by:          Daniel Grace
>> Email address:      dgrace(at)wingsnw(dot)com
>> PostgreSQL version: 9.1-beta1
>> Operating system:   Win7 x64 (x86 postgres)
>> Description:        ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster
>> on a fresh install
>> Details:
>
>> While trying to restore a database created under 9.1 alpha (created with
>> pg_dumpall):
>
>> CREATE ROLE postgres;
>> ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN
>> REPLICATION PASSWORD 'xxxx';
>> CREATE ROLE foo;
>> ALTER ROLE foo WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN
>> NOREPLICATION VALID UNTIL 'infinity';
>
>> The final statement causes postmaster to crash.
>
> Hmm, cannot duplicate this here ... can anyone else?  Windows-specific
> issue perhaps?

Will commit 2e82d0b396473b595a30f68b37b8dfd41c37dff8 have possibly fixed this?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Daniel Grace <dgrace(at)wingsnw(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install
Date: 2011-05-11 20:36:41
Message-ID: 20377.1305146201@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, May 4, 2011 at 4:39 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> "Daniel Grace" <dgrace(at)wingsnw(dot)com> writes:
>>> ALTER ROLE foo WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB NOLOGIN
>>> NOREPLICATION VALID UNTIL 'infinity';

>> Hmm, cannot duplicate this here ... can anyone else? Windows-specific
>> issue perhaps?

> Will commit 2e82d0b396473b595a30f68b37b8dfd41c37dff8 have possibly fixed this?

It will have stopped the crash, but no more. See
http://archives.postgresql.org/pgsql-hackers/2011-05/msg00589.php

Working on the rest of the fix now.

regards, tom lane


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Daniel Grace <dgrace(at)wingsnw(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install
Date: 2011-05-12 00:02:27
Message-ID: 882.1305158547@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Will commit 2e82d0b396473b595a30f68b37b8dfd41c37dff8 have possibly fixed this?

This should now be fixed as of HEAD, but it wouldn't be a bad idea for
someone to check that it really works on Windows. Look at whether the
timezone_abbreviations GUC has a sane value and you can use timezone
abbreviations, not just whether 'infinity' crashes.

regards, tom lane


From: Daniel Grace <dgrace(at)wingsnw(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6005: ALTER ROLE ... VALID UNTIL 'infinity' crashes postmaster on a fresh install
Date: 2011-05-12 17:28:49
Message-ID: BANLkTik_WYKu3qftQrXj0XyHdeiqhmMZEQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

I don't have the means to easily compile a PG build, but if there's a
place to get nightly builds or such I'd be happy to give it a shot and
report back.

On Wed, May 11, 2011 at 5:02 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> Will commit 2e82d0b396473b595a30f68b37b8dfd41c37dff8 have possibly fixed this?
>
> This should now be fixed as of HEAD, but it wouldn't be a bad idea for
> someone to check that it really works on Windows.  Look at whether the
> timezone_abbreviations GUC has a sane value and you can use timezone
> abbreviations, not just whether 'infinity' crashes.
>
>                        regards, tom lane
>

--
Daniel Grace
AGE, LLC
System Administrator and Software Developer