Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Itagaki Takahiro
Tom Lane t...@sss.pgh.pa.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

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

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

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Itagaki Takahiro itagaki.takah...@oss.ntt.co.jp 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-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Alvaro Herrera
Tom Lane escribió: Alvaro Herrera alvhe...@commandprompt.com 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

Re: [HACKERS] [BUGS] BUG #4941: pg_stat_statements crash

2009-07-26 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com 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