Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane escribió: >> I looked at that and decided it was OK as-is. How do you want to >> change it? > The reason that it doesn't need locks is not that there's no other > process running, but that it was already initialized, in the case when > found is false. Mph. Th

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Alvaro Herrera
Tom Lane escribió: > Alvaro Herrera writes: > > Itagaki Takahiro escribi�: > >> Here is a patch to fix pg_stat_statements on Windows. > > > Hmm, it seems the comment just above the patched line needs to be fixed. > > I looked at that and decided it was OK as-is. How do you want to > change it?

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Alvaro Herrera writes: > Itagaki Takahiro escribió: >> Here is a patch to fix pg_stat_statements on Windows. > Hmm, it seems the comment just above the patched line needs to be fixed. I looked at that and decided it was OK as-is. How do you want to change it? regards, t

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Itagaki Takahiro writes: > Here is a patch to fix pg_stat_statements on Windows. Yeah, that looks about right to me. Committed. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Alvaro Herrera
Itagaki Takahiro escribió: > > Tom Lane 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. Hmm, it seems the comment just above t

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Itagaki Takahiro
Tom Lane 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; The

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Itagaki Takahiro writes: > 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. > How about executing the routine during AddinShmemInitLock is taken? You should not hold AddinShmemInitLock any longer than real

Re: [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Itagaki Takahiro
"" wrote: > Bug reference: 4941 > PostgreSQL version: 8.4.0 > Operating system: windows 2008,2003 > Description:pg_stat_statementscrash > crash every time after that even with reboots. I researched the issue, and found pgss_shmem_startup() is called for each connection est