Thread: Change "recycled transaction log" from LOG to DEBUG1

Change "recycled transaction log" from LOG to DEBUG1

From
"Greg Sabino Mullane"
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message


On August 9, Tom Lane wrote regarding "recycled transaction log file"
messages appearing in the server logs:

> This is normal behavior. At some point we'll probably knock down the
> priority of those messages from LOG to DEBUG...

I'm all for it, for I am tired of seeing those messages in my logs
as well. I'd make a link to Tom's original post, but once again
archives.postgresql.org is not working.

Index: xlog.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/backend/access/transam/xlog.c,v
retrieving revision 1.168
diff -c -r1.168 xlog.c
*** xlog.c      30 Aug 2004 02:54:38 -0000      1.168
--- xlog.c      5 Sep 2004 15:26:43 -0000
***************
*** 2154,2160 ****
             true, XLOGfileslop,
             true))
    {
!           ereport(LOG,
        (errmsg("recycled transaction log file \"%s\"",
          xlde->d_name)));
    }
--- 2154,2160 ----
             true, XLOGfileslop,
             true))
    {
!           ereport(DEBUG1,
        (errmsg("recycled transaction log file \"%s\"",
          xlde->d_name)));
    }




--
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200409051137

-----BEGIN PGP SIGNATURE-----

iD8DBQFBOzNBvJuQZxSWSsgRApOvAKCPoVcSR29wft9RIxk4bi3R5SkahQCg0yKr
ISROl8QXPuh8g16O+zRCeus=
=dFk7
-----END PGP SIGNATURE-----



Re: Change "recycled transaction log" from LOG to DEBUG1

From
Christopher Kings-Lynne
Date:
May as well downgrade the CLOG message as well then.

Chris

Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
>
> On August 9, Tom Lane wrote regarding "recycled transaction log file"
> messages appearing in the server logs:
>
>
>>This is normal behavior. At some point we'll probably knock down the
>>priority of those messages from LOG to DEBUG...
>
>
> I'm all for it, for I am tired of seeing those messages in my logs
> as well. I'd make a link to Tom's original post, but once again
> archives.postgresql.org is not working.
>
> Index: xlog.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/backend/access/transam/xlog.c,v
> retrieving revision 1.168
> diff -c -r1.168 xlog.c
> *** xlog.c      30 Aug 2004 02:54:38 -0000      1.168
> --- xlog.c      5 Sep 2004 15:26:43 -0000
> ***************
> *** 2154,2160 ****
>              true, XLOGfileslop,
>              true))
>     {
> !           ereport(LOG,
>         (errmsg("recycled transaction log file \"%s\"",
>           xlde->d_name)));
>     }
> --- 2154,2160 ----
>              true, XLOGfileslop,
>              true))
>     {
> !           ereport(DEBUG1,
>         (errmsg("recycled transaction log file \"%s\"",
>           xlde->d_name)));
>     }
>
>
>
>
> --
> Greg Sabino Mullane greg@turnstep.com
> PGP Key: 0x14964AC8 200409051137
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFBOzNBvJuQZxSWSsgRApOvAKCPoVcSR29wft9RIxk4bi3R5SkahQCg0yKr
> ISROl8QXPuh8g16O+zRCeus=
> =dFk7
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

Re: Change "recycled transaction log" from LOG to DEBUG1

From
Tom Lane
Date:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> May as well downgrade the CLOG message as well then.

Agreed.  I've applied the attached extended patch.

            regards, tom lane

*** src/backend/access/transam/slru.c.orig    Sun Aug 29 09:54:52 2004
--- src/backend/access/transam/slru.c    Sun Sep  5 23:01:57 2004
***************
*** 944,950 ****
                  if (doDeletions)
                  {
                      snprintf(path, MAXPGPATH, "%s/%s", ctl->Dir, clde->d_name);
!                     ereport(LOG,
                              (errmsg("removing file \"%s\"", path)));
                      unlink(path);
                  }
--- 944,950 ----
                  if (doDeletions)
                  {
                      snprintf(path, MAXPGPATH, "%s/%s", ctl->Dir, clde->d_name);
!                     ereport(DEBUG1,
                              (errmsg("removing file \"%s\"", path)));
                      unlink(path);
                  }
*** src/backend/access/transam/xlog.c.orig    Sun Aug 29 22:57:29 2004
--- src/backend/access/transam/xlog.c    Sun Sep  5 23:01:58 2004
***************
*** 2154,2167 ****
                                             true, XLOGfileslop,
                                             true))
                  {
!                     ereport(LOG,
                            (errmsg("recycled transaction log file \"%s\"",
                                    xlde->d_name)));
                  }
                  else
                  {
                      /* No need for any more future segments... */
!                     ereport(LOG,
                            (errmsg("removing transaction log file \"%s\"",
                                    xlde->d_name)));
                      unlink(path);
--- 2154,2167 ----
                                             true, XLOGfileslop,
                                             true))
                  {
!                     ereport(DEBUG1,
                            (errmsg("recycled transaction log file \"%s\"",
                                    xlde->d_name)));
                  }
                  else
                  {
                      /* No need for any more future segments... */
!                     ereport(DEBUG1,
                            (errmsg("removing transaction log file \"%s\"",
                                    xlde->d_name)));
                      unlink(path);