Thanks, applied.

---------------------------------------------------------------------------

Robert Lor wrote:
> Tom Lane wrote:
> > Robert Lor <robert....@sun.com> writes:
> >   
> >> Tom Lane wrote:
> >>     
> >>> I agree.  If the probe is meant to track only *some* WAL writes
> >>> then it needs to be named something less generic than
> >>> TRACE_POSTGRESQL_WAL_BUFFER_WRITE.
> >>>
> >>>       
> >> How about change it to TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY similar to 
> >> TRACE_POSTGRESQL_BUFFER_WRITE_DIRTY for shared buffers?
> >>     
> >
> > Works for me...
> >
> >     
> Attached is the patch for the above name change.
> 
> 
> -Robert

> Index: src/backend/access/transam/xlog.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/backend/access/transam/xlog.c,v
> retrieving revision 1.324
> diff -u -3 -p -r1.324 xlog.c
> --- src/backend/access/transam/xlog.c 17 Dec 2008 01:39:03 -0000      1.324
> +++ src/backend/access/transam/xlog.c 22 Dec 2008 16:28:00 -0000
> @@ -1318,14 +1318,14 @@ AdvanceXLInsertBuffer(bool new_segment)
>                                * Have to write buffers while holding insert 
> lock. This is
>                                * not good, so only write as much as we 
> absolutely must.
>                                */
> -                             TRACE_POSTGRESQL_WAL_BUFFER_WRITE_START();
> +                             TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_START();
>                               WriteRqst.Write = OldPageRqstPtr;
>                               WriteRqst.Flush.xlogid = 0;
>                               WriteRqst.Flush.xrecoff = 0;
>                               XLogWrite(WriteRqst, false, false);
>                               LWLockRelease(WALWriteLock);
>                               Insert->LogwrtResult = LogwrtResult;
> -                             TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DONE();
> +                             TRACE_POSTGRESQL_WAL_BUFFER_WRITE_DIRTY_DONE();
>                       }
>               }
>       }
> Index: src/backend/utils/probes.d
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/backend/utils/probes.d,v
> retrieving revision 1.4
> diff -u -3 -p -r1.4 probes.d
> --- src/backend/utils/probes.d        17 Dec 2008 01:39:04 -0000      1.4
> +++ src/backend/utils/probes.d        22 Dec 2008 16:28:01 -0000
> @@ -89,6 +89,6 @@ provider postgresql {
>  
>       probe xlog__insert(unsigned char, unsigned char);
>       probe xlog__switch();
> -     probe wal__buffer__write__start();
> -     probe wal__buffer__write__done();
> +     probe wal__buffer__write__dirty__start();
> +     probe wal__buffer__write__dirty__done();
>  };

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to