Skip site navigation (1) Skip section navigation (2)

Re: Small xlog.c cleanup

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Small xlog.c cleanup
Date: 2001-02-27 18:31:35
Message-ID: Pine.BSF.4.33.0102271430240.354-100000@mobile.hub.org (view raw or flat)
Thread:
Lists: pgsql-patches
On Tue, 27 Feb 2001, Bruce Momjian wrote:

> > On Tue, 27 Feb 2001, Bruce Momjian wrote:
> >
> > > All source gets reformatted before release by src/tools/pgindent
> > > anyway.
> >
> > This is more than just a formatting change -- it turns
> > some static globals into static locals.
> >
> > Sorry, I should have been a little more verbose in my
> > description.
>
> Can you point me to the change.  I don't see it:
>
> ---------------------------------------------------------------------------
>

He's moved the "static globals" from around line 286 of
src/backend/access/transam/xlog.c:

> -static int     readFile = -1;
> -static uint32 readId = 0;
> -static uint32 readSeg = 0;
> -static uint32 readOff = 0;
>  static char readBuf[BLCKSZ];
>  static XLogRecord *nextRecord = NULL;
>

to be static locals inside of function ReadRecord around line 1216 in the
same file:

> @@ -1214,6 +1210,10 @@
>         bool            nextmode = (RecPtr == NULL);
>         int                     emode = (nextmode) ? LOG : STOP;
>         bool            noBlck = false;
> +       static int      readFile = -1;
> +       static uint32 readId = 0;
> +       static uint32 readSeg = 0;
> +       static uint32 readOff = 0;
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org           secondary: scrappy(at){freebsd|postgresql}.org


In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2001-02-27 18:38:38
Subject: Re: Small xlog.c cleanup
Previous:From: Bruce MomjianDate: 2001-02-27 18:07:28
Subject: Re: Small xlog.c cleanup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group