| From: | Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
| Cc: | Dilip kumar <dilip(dot)kumar(at)huawei(dot)com>, pgsql-hackers(at)postgresql(dot)org, furuyao(at)pm(dot)nttdata(dot)co(dot)jp |
| Subject: | Re: pg_xlogdump --stats |
| Date: | 2014-07-04 13:29:07 |
| Message-ID: | 20140704132907.GA17867@toroid.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
At 2014-07-04 11:34:21 +0200, andres(at)2ndquadrant(dot)com wrote:
>
> I think we're going to have to redefine the
> PGAC_FUNC_SNPRINTF_LONG_LONG_INT_FORMAT callsite in configure.in to
> define INT64_MODIFIER='"ll/l/I64D"'
I've attached a patch to do this, and also add INT64_MODIFIER to
pg_config.h.in: 0001-modifier.diff
I reran autoconf, and just for convenience I've attached the resulting
changes to configure: 0002-configure.diff
Then there are the rm_identify changes: 0003-rmid.diff
Finally, the xlogdump patch using INT64_MODIFIER: 0004-xlogdump.diff
I can confirm that this series applies in-order to master, and that the
result builds cleanly (including after each patch) on my machine, and
that the resulting pg_xlogdump works as expected.
NOTE: I do not know what to do about pg_config.h.win32. If someone tells
me what to do, I can submit another patch.
> Some additional leaking here.
Two of the extra calls to psprintf in pg_xlogdump happen at most
RM_MAX_ID*16 (i.e. O(record-types) not O(records)) times, and the other
two happen just before exit. It would be easy to use a static buffer and
snprintf, but I don't think it's worth doing in this case.
-- Abhijit, hoping with crossed fingers to not forget attachments now.
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-modifier.diff | text/x-diff | 5.0 KB |
| 0002-configure.diff | text/x-diff | 4.1 KB |
| 0003-rmid.diff | text/x-diff | 25.6 KB |
| 0004-xlogdump.diff | text/x-diff | 10.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kohei KaiGai | 2014-07-04 13:29:34 | Re: No toast table for pg_shseclabel but for pg_seclabel |
| Previous Message | Oskari Saarenmaa | 2014-07-04 12:56:36 | Re: log_error_verbosity and unexpected errors |