pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: get_controlfile() can leak fds in the backend
Date: Thu, 28 Feb 2019 16:09:32 -0500
Message-ID: <c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com> (raw)
In-Reply-To: <20190228122059.GA11351@paquier.xyz>
References: <20190227074728.GA15710@paquier.xyz>
	<748d7697-a25f-029d-e607-dbe4546a1b38@joeconway.com>
	<22d70be7-9334-bfdc-a071-2efca3c52b98@joeconway.com>
	<20190228005445.GC1617@paquier.xyz>
	<d019854e-6325-5b90-9962-4700d92cedf1@joeconway.com>
	<20190228122059.GA11351@paquier.xyz>

On 2/28/19 7:20 AM, Michael Paquier wrote:
> On Thu, Feb 28, 2019 at 07:11:04AM -0500, Joe Conway wrote:
>> Sure, will do. What are your thoughts on backpatching? This seems
>> unlikely to be a practical concern in the field, so my inclination is a
>> master only fix.
> 
> I agree that this would unlikely become an issue as an error on the
> control file would most likely be a PANIC when updating it, so fixing
> only HEAD sounds fine to me.  Thanks for asking!


Committed and push that way.

By the way, while looking at this, I noted at least a couple of places
where OpenTransientFile() is being passed O_RDWR when the usage is
pretty clearly intended to be read-only. For example at least two
instances in slru.c -- SlruPhysicalReadPage() and
SimpleLruDoesPhysicalPageExist(). Is it worth while searching for and
fixing those instances?

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

Attachments:

  [application/pgp-signature] signature.asc (832B, ../c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com/2-signature.asc)
  download

view thread (18+ messages)  latest in thread

Message-ID: <c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com>
Permalink:  ../c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com/
Also on:    postgresql.org/message-id/c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: mail@joeconway.com, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: get_controlfile() can leak fds in the backend
  In-Reply-To: <c49b69ec-e2f7-ff33-4f17-0eaa4f2cef27@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox