From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | John Naylor <johncnaylorls(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Subject: | Re: ECPG cleanup and fix for clang compile-time problem |
Date: | 2024-10-14 18:25:10 |
Message-ID: | 3784497.1728930310@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
John Naylor <johncnaylorls(at)gmail(dot)com> writes:
>> [v5]
Thanks for reviewing! I pushed 0001-0005 and 0009, adopting
your suggestions except for
> + /* List a token here if pgc.l assigns to base_yylval.str for it */
> Does pgc.l need to have a similar comment?
That's not a bad suggestion, but I couldn't see any very useful place
to put such a comment.
> I haven't looked closely at 0006 through 0009. One possible concern is
> that the regression tests might not cover very well, but if you can
> get valgrind silent for memory leaks for what they do cover, that's
> certainly a good step.
Attached are rebased and renumbered 0006-0008, mostly to keep the
cfbot happy. We could actually stop here, if we were feeling lazy,
but now that I've done the work I'm inclined to push forward with
the rest.
The rest is just memory leak removal, and I suspect that nobody really
cares that much about small leakage in the preprocessor: you'd have to
be running some darn big files through it to notice. FTR, here are
the total leaks reported by valgrind for running the ecpg regression
tests, using code like
$ grep lost: *log | tr -d ',' | awk '{sum += $5}
END {print sum}'
Before these patches: 25743
after 0003: 59049363
after 0005: 141556 (this is master now)
after 0006(0001): 132633
after 0007(0002): 9087
after 0008(0003): 0
So clearly, 0003 by itself wasn't good enough, but arguably no
real users will notice the extra inefficiency as of HEAD.
Still, I'd kind of like to get 0007 (now 0002) in there, and
I believe 0006 (0001) is a necessary prerequisite to that.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v6-0001-ecpg-fix-some-memory-leakage-of-data-type-related.patch | text/x-diff | 8.6 KB |
v6-0002-ecpg-put-all-string-valued-tokens-returned-by-pgc.patch | text/x-diff | 7.1 KB |
v6-0003-ecpg-clean-up-some-other-assorted-memory-leaks.patch | text/x-diff | 16.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2024-10-14 19:05:35 | Re: Doc: typo in config.sgml |
Previous Message | Bruce Momjian | 2024-10-14 16:57:20 | Re: pg_upgrade check for invalid databases |