From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndQuadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: palloc unification |
Date: | 2013-02-11 21:58:14 |
Message-ID: | 20130211215814.GD4737@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here's a more finalized version of this. There are two main interesting
changes here:
1. postgres_fe.h includes common/fe_memutils.h
This means all frontend programs get the #include without having to
do it explicitely by themselves. postgres.h includes utils/palloc.h
which I used as precendent for this.
2. fe_memutils.h includes utils/palloc.h
This means all frontend programs get the palloc() et al prototypes.
Some other things of note:
a. pg_upgrade was using postgres.h all over the place instead of
postgres_fe.h. There's no reason for this AFAICS so I changed it.
No warnings, make check passes.
b. pg_resetxlog is the only frontend place that uses pg_malloc() and
which needs to #include postgres.h instead of postgres_fe.h, so it's
the only place that needs to include fe_memutils.h directly.
(pg_controldata is the other place that includes postgres.h, but it
doesn't need the pg_malloc etc declarations).
c. I added the MSVC bits. I tested that most of it works, but the
various regress executables as well as zic failed to build due to
lack of libpgcommon at link time. I think I fixed it; I'm waiting on
new tests to run. (This patch is the fixed version).
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Attachment | Content-Type | Size |
---|---|---|
commonalize-palloc-2.patch | text/x-diff | 48.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2013-02-11 23:10:50 | Re: JSON NULLs |
Previous Message | Phil Sorber | 2013-02-11 21:42:02 | Re: [PATCH] Add PQconninfoParseParams and PQconninfodefaultsMerge to libpq |