Re: [HACKERS] Improve OOM handling in pg_locale.c

2016-11-21 Thread Tom Lane
Mithun Cy writes: > On Thu, Oct 13, 2016 at 1:40 PM, Michael Paquier > wrote: >> I am attaching that to the next CF. > One thing which you might need to reconsider is removal of memory leak > comments. There is still a leak if there is an

Re: [HACKERS] Improve OOM handling in pg_locale.c

2016-11-21 Thread Michael Paquier
On Tue, Nov 22, 2016 at 8:28 AM, Tom Lane wrote: > I could have lived with leaving the leak there, but really this wasn't > fixing the worst problem with the code: if it did throw an error out of > the middle of that sequence, it would leave the process setlocale'd to > some

Re: [HACKERS] Improve OOM handling in pg_locale.c

2016-11-16 Thread Mithun Cy
On Thu, Oct 13, 2016 at 1:40 PM, Michael Paquier wrote: > I am attaching that to the next CF. I have tested this patch. Now we error out as OOM instead of crash. postgres=# SELECT '12.34'::money; ERROR: out of memory

Re: [HACKERS] Improve OOM handling in pg_locale.c

2016-11-16 Thread Haribabu Kommi
Hi Mithun, This is a gentle reminder. you assigned as reviewer to the current patch in the 11-2016 commitfest. But you haven't shared your review yet. Can you please try to share your views about the patch. This will help us in smoother operation of commitfest. Please Ignore if you already

[HACKERS] Improve OOM handling in pg_locale.c

2016-10-13 Thread Michael Paquier
Hi all, This is a follow-up of https://www.postgresql.org/message-id/11202.1472597262%40sss.pgh.pa.us where we are looking at improving OOM handling in the code. In short, report an ERROR appropriately instead of crashing. As mentioned in this message, pg_locale.c is trickier to handle because we