From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: GCC 7 warnings |
Date: | 2017-04-12 03:46:30 |
Message-ID: | c4e7f361-358b-45f9-bbe4-e167fa4de16c@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4/11/17 13:57, Alvaro Herrera wrote:
> Tom Lane wrote:
>> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>
>>> d) Replace most of the problematic code with psprintf() and dynamically
>>> sized buffers.
>>
>> +1 for (c) as you have it. Later we might think about selectively
>> doing (d), but it seems like more work for probably not much benefit.
>
> Yeah -- also it's possible some of these code paths must not attempt to
> palloc() for robustness reasons. I would go for c) only for now, and
> only try d) for very specific cases where there are no such concerns.
Attached is a more refined patch that I propose for PG10 now. Compared
to the previous rushed version, this one uses some more precise
arithmetic to size some of the buffers.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Fix-new-warnings-from-GCC-7.patch | invalid/octet-stream | 24.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2017-04-12 03:46:43 | Re: [sqlsmith] ERROR: badly formatted node string "RESTRICTINFO... |
Previous Message | Noah Misch | 2017-04-12 03:41:48 | Re: SUBSCRIPTIONS and pg_upgrade |