Re: [PATCHES] revise a comment in CreateCheckPoint()

2005-04-24 Thread Qingqing Zhou

"Tom Lane" <[EMAIL PROTECTED]> writes
>
> I thought your version was even more so :-(.  I've applied the attached
> patch instead.
>

That's too bad :-( but the happy part is that it is fixed now.

Regards,
Qingqing



---(end of broadcast)---
TIP 8: explain analyze is your friend


Re: [PATCHES] revise a comment in CreateCheckPoint()

2005-04-23 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes:
> The original comment of why we are safe without protection of critical
> section is confusing.

I thought your version was even more so :-(.  I've applied the attached
patch instead.

regards, tom lane

Index: xlog.c
===
RCS file: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v
retrieving revision 1.187
diff -c -r1.187 xlog.c
*** xlog.c  17 Apr 2005 03:04:29 -  1.187
--- xlog.c  23 Apr 2005 18:48:45 -
***
*** 4925,4931 
 *
 * This I/O could fail for various reasons.  If so, we will fail to
 * complete the checkpoint, but there is no reason to force a system
!* panic.  Accordingly, exit critical section while doing it.
 */
END_CRIT_SECTION();
  
--- 4925,4934 
 *
 * This I/O could fail for various reasons.  If so, we will fail to
 * complete the checkpoint, but there is no reason to force a system
!* panic.  Accordingly, exit critical section while doing it.  (If
!* we are doing a shutdown checkpoint, we probably *should* panic ---
!* but that will happen anyway because we'll still be inside the
!* critical section established by ShutdownXLOG.)
 */
END_CRIT_SECTION();
  

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[PATCHES] revise a comment in CreateCheckPoint()

2005-04-21 Thread Qingqing Zhou
The original comment of why we are safe without protection of critical
section is confusing.


Index: xlog.c
===
RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xlog.c,v
retrieving revision 1.187
diff -c -r1.187 xlog.c
*** xlog.c  17 Apr 2005 03:04:29 -  1.187
--- xlog.c  21 Apr 2005 10:12:01 -
***
*** 4924,4931 
 * buffers and commit-log buffers are flushed to disk.
 *
 * This I/O could fail for various reasons.  If so, we will fail to
!* complete the checkpoint, but there is no reason to force a system
!* panic.  Accordingly, exit critical section while doing it.
 */
END_CRIT_SECTION();

--- 4924,4934 
 * buffers and commit-log buffers are flushed to disk.
 *
 * This I/O could fail for various reasons.  If so, we will fail to
!* complete the checkpoint, there is no problem if this occurs in
!* ordinary situtations but it could be a problem if we are shutdown
!* database. However, we increase the CritSectionCount in
ShutdownXLOG()
!* already, so it is ok.  Accordingly, exit critical section while
!* doing it.
 */
END_CRIT_SECTION();




---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster