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

BUG #6082: server segfault - pg_stat_reset_shared(null)

From
"Steve Haslam"
Date:
The following bug has been logged online:

Bug reference:      6082
Logged by:          Steve Haslam
Email address:      araqnid@googlemail.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.

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

From
Magnus Hagander
Date:
On Wed, Jun 29, 2011 at 15:31, Steve Haslam <araqnid@googlemail.com> wrote:
>
> The following bug has been logged online:
>
> Bug reference: =A0 =A0 =A06082
> Logged by: =A0 =A0 =A0 =A0 =A0Steve Haslam
> Email address: =A0 =A0 =A0araqnid@googlemail.com
> PostgreSQL version: 9.0.4
> Operating system: =A0 Debian GNU/Linux (amd64)
> Description: =A0 =A0 =A0 =A0server segfault - pg_stat_reset_shared(null)
> Details:
>
> =3D> 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...

--=20
=A0Magnus Hagander
=A0Me: http://www.hagander.net/
=A0Work: http://www.redpill-linpro.com/

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

From
Tom Lane
Date:
Magnus Hagander <magnus@hagander.net> writes:
> On Wed, Jun 29, 2011 at 15:31, Steve Haslam <araqnid@googlemail.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

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

From
Magnus Hagander
Date:
On Wed, Jun 29, 2011 at 23:52, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> On Wed, Jun 29, 2011 at 15:31, Steve Haslam <araqnid@googlemail.com> wro=
te:
>>> =3D> 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...


--=20
=A0Magnus Hagander
=A0Me: http://www.hagander.net/
=A0Work: http://www.redpill-linpro.com/

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

From
Bruce Momjian
Date:
Steve Haslam wrote:
>
> The following bug has been logged online:
>
> Bug reference:      6082
> Logged by:          Steve Haslam
> Email address:      araqnid@googlemail.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@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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