Re: Memory leak with XLogFileCopy since de768844 (WAL file with .partial)

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: Memory leak with XLogFileCopy since de768844 (WAL file with .partial)
Date: 2015-06-08 02:52:38
Message-ID: CAB7nPqQ9E3nbaYz8QuWezuOiOs03yOyqLUcQd6uuF3DgiQakOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 5, 2015 at 10:45 PM, Fujii Masao wrote:
> Why don't we call InstallXLogFileSegment() at the end of XLogFileCopy()?
> If we do that, the risk of memory leak you're worried will disappear at all.

Yes, that looks fine, XLogFileCopy() would copy to a temporary file,
then install it definitely. Updated patch attached.
--
Michael

Attachment Content-Type Size
20150608_xlogcopy_fixes_v3.patch text/x-patch 5.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Abhijit Menon-Sen 2015-06-08 03:42:49 skipping pg_log in basebackup (was Re: pg_basebackup and pg_stat_tmp directory)
Previous Message Thomas Munro 2015-06-08 01:05:28 Re: could not truncate directory "pg_subtrans": apparent wraparound