Re: BUG #6082: server segfault - pg_stat_reset_shared(null)

Lists: pgsql-bugs
From: "Steve Haslam" <araqnid(at)googlemail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6082: server segfault - pg_stat_reset_shared(null)
Date: 2011-06-29 13:31:49
Message-ID: 201106291331.p5TDVn7E009125@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 6082
Logged by: Steve Haslam
Email address: araqnid(at)googlemail(dot)com
PostgreSQL version: 9.0.4
Operating system: Debian GNU/Linux (amd64)
Description: server segfault - pg_stat_reset_shared(null)
Details:

=> select pg_stat_reset_shared(null)
*server segfault*

Also occurs with a 9.1b2 build.

To be fair, it *does* reset all the shared statistics.


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Steve Haslam <araqnid(at)googlemail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6082: server segfault - pg_stat_reset_shared(null)
Date: 2011-06-29 17:38:38
Message-ID: BANLkTin=4fWmPL5gEKzqhtE4bHbxZmv8Ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, Jun 29, 2011 at 15:31, Steve Haslam <araqnid(at)googlemail(dot)com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      6082
> Logged by:          Steve Haslam
> Email address:      araqnid(at)googlemail(dot)com
> PostgreSQL version: 9.0.4
> Operating system:   Debian GNU/Linux (amd64)
> Description:        server segfault - pg_stat_reset_shared(null)
> Details:
>
> => select pg_stat_reset_shared(null)
> *server segfault*
>
> Also occurs with a 9.1b2 build.

Thanks for the report - fixed, and will be in next releases.

> To be fair, it *does* reset all the shared statistics.

Not in a very nice way though...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Steve Haslam <araqnid(at)googlemail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6082: server segfault - pg_stat_reset_shared(null)
Date: 2011-06-29 21:52:22
Message-ID: 13498.1309384342@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On Wed, Jun 29, 2011 at 15:31, Steve Haslam <araqnid(at)googlemail(dot)com> wrote:
>> => select pg_stat_reset_shared(null)
>> *server segfault*

> Thanks for the report - fixed, and will be in next releases.

Seems like the more appropriate fix in HEAD is to mark the function
strict in pg_proc.h.

regards, tom lane


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Steve Haslam <araqnid(at)googlemail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6082: server segfault - pg_stat_reset_shared(null)
Date: 2011-07-03 11:19:04
Message-ID: CABUevEzPEXyqdfyWCDh6Lm6AOjFPBzrutB22_pAszHgEsorisg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, Jun 29, 2011 at 23:52, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> On Wed, Jun 29, 2011 at 15:31, Steve Haslam <araqnid(at)googlemail(dot)com> wrote:
>>> => select pg_stat_reset_shared(null)
>>> *server segfault*
>
>> Thanks for the report - fixed, and will be in next releases.
>
> Seems like the more appropriate fix in HEAD is to mark the function
> strict in pg_proc.h.

I considered that, but gave it up when I realized it would require a
new initdb and I wanted the same fix everywhere. But agreed that it's
cleaner, so I've reverted my previous patch on HEAD and made this
change instead. Left the old patch on backbranches (including 9.1) so
we don't force an initdb there...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Steve Haslam <araqnid(at)googlemail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6082: server segfault - pg_stat_reset_shared(null)
Date: 2011-07-12 00:35:37
Message-ID: 201107120035.p6C0Zbi29110@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Steve Haslam wrote:
>
> The following bug has been logged online:
>
> Bug reference: 6082
> Logged by: Steve Haslam
> Email address: araqnid(at)googlemail(dot)com
> PostgreSQL version: 9.0.4
> Operating system: Debian GNU/Linux (amd64)
> Description: server segfault - pg_stat_reset_shared(null)
> Details:
>
> => select pg_stat_reset_shared(null)
> *server segfault*
>
> Also occurs with a 9.1b2 build.
>
> To be fair, it *does* reset all the shared statistics.

Now that's a RESET! ;-)

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +