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

Re: BUG #4941: pg_stat_statements crash

From: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Cc: "" <alr(dot)nospamforme(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4941: pg_stat_statements crash
Date: 2009-07-27 02:54:59
Message-ID: 20090727114035.E3D2.52131E4D@oss.ntt.co.jp (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> > We should call [Read dumpfile] routine only once even on Windows.
> Seems to me that you should simply do the load only when found is false.

Here is a patch to fix pg_stat_statements on Windows.

I see we don't need any locks because initialization is done in postmaster;
There are no chance to see uninitialized state of 'pgss' after relasing
AddinShmemInitLock and before load dumpfile into it.

I also check pgss_shmem_shutdown and no problem.
It is called only once from postmaster on shutdown.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Attachment: pg_stat_statements.patch
Description: application/octet-stream (518 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2009-07-27 03:05:05
Subject: Re: autogenerating headers & bki stuff
Previous:From: Robert HaasDate: 2009-07-27 02:52:24
Subject: Re: generic explain options v3

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2009-07-27 03:30:42
Subject: Re: BUG #4941: pg_stat_statements crash
Previous:From: Federico AguirreDate: 2009-07-27 02:33:43
Subject: BUG #4942: edb_apachephp.bin error

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