Re: [HACKERS] myProcLocks initialization

2011-10-31 Thread Robert Haas
On Sun, Oct 30, 2011 at 11:26 PM, Robert Haas robertmh...@gmail.com wrote: On Sun, Oct 30, 2011 at 11:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I'd like to propose the attached patch, which initializes each PGPROC's myProcLocks just once at postmaster

Re: [HACKERS] myProcLocks initialization

2011-10-31 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Revised patch attached. I think it would be useful to assert this both at process startup time and at process shutdown, since it would really be much nicer to have the process that didn't clean up fail the assertion, rather than the new one that

Re: [HACKERS] myProcLocks initialization

2011-10-31 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Oct 31, 2011 at 7:54 PM, Robert Haas robertmh...@gmail.com wrote: Revised patch attached.  I think it would be useful to assert this both at process startup time and at process shutdown, since it would really be much nicer to have the process

Re: [HACKERS] myProcLocks initialization

2011-10-31 Thread Simon Riggs
On Mon, Oct 31, 2011 at 7:54 PM, Robert Haas robertmh...@gmail.com wrote: Revised patch attached.  I think it would be useful to assert this both at process startup time and at process shutdown, since it would really be much nicer to have the process that didn't clean up fail the assertion,

Re: [HACKERS] myProcLocks initialization

2011-10-30 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I'd like to propose the attached patch, which initializes each PGPROC's myProcLocks just once at postmaster startup, rather than every time the PGPROC is handed out to a backend. These lists should always be emptied before a backend shuts down, so a

Re: [HACKERS] myProcLocks initialization

2011-10-30 Thread Robert Haas
On Sun, Oct 30, 2011 at 11:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I'd like to propose the attached patch, which initializes each PGPROC's myProcLocks just once at postmaster startup, rather than every time the PGPROC is handed out to a backend.