pgstat cleanup: use palloc and AllocateFile - Mailing list pgsql-patches

From Neil Conway
Subject pgstat cleanup: use palloc and AllocateFile
Date
Msg-id 1098840050.1964.6.camel@localhost.localdomain
Whole thread Raw
Responses Re: pgstat cleanup: use palloc and AllocateFile  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
This patch changes pgstat.c to use palloc(), AllocateFile() and
FreeFile() rather than malloc(), fopen() and fclose(), respectively.

I changed more_tabstat_space() (which is invoked at various times
indirectly throughout the backend) to allocate memory in its own private
memory context, rather than use malloc() -- we can't just use
CurrentMemoryContext because that may not be sufficiently long-lived.

Barring any objections I intend to apply this to HEAD tomorrow.

-Neil


Attachment

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_ctl -D canonicalization
Next
From: "Ed L."
Date:
Subject: Re: HP-UX PA-RISC/Itanium 64-bit Patch and HP-UX 11.23 Patch