Re: ALTER SYSTEM SET typos and fix for temporary file name management

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM SET typos and fix for temporary file name management
Date: 2014-01-22 14:15:01
Message-ID: CA+Tgmob4fp7B2ZS7T49v0++7ss3UhFQNA=U-VuL=EHDNeC2s1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 21, 2014 at 7:02 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Wed, Jan 22, 2014 at 5:29 AM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)com> wrote:
>> I agree with Michael that having pg_basebackup be aware of the ".temp"
>> suffix is ugly; for instance if we were to fix it to ".tmp" in ALTER
>> SYSTEM but forgot to change pg_basebackup, the check would be
>> immediately broken. But on the other hand I'm not sure why it's such a
>> problem for pg_basebackup that it needs to be checking in the first
>> place -- how about we rip that out?
> Coupled with the addition of a pgsql_tmp prefix to the temp
> configuration file name would work, yes we could remove this check
> part.
>
>> Perhaps the temp file needs to be in pgsql_tmp? (Do we need to worry
>> about cross-filesystem links if we do? I mean, do we support mounting
>> pgsql_tmp separately?)
> Using pgsql_tmp looks a bit weird as well, as this prefix is used only
> for temporary files doing database-related operations, and ALTER
> SYSTEM is not one. Doing that this would need a mention in the docs at
> least:
> http://www.postgresql.org/docs/devel/static/storage-file-layout.html
> Thoughts?

I think moving the temp file to a different directory than the
permanent file is a non-starter. As Alvaro says, that could be on a
different file system, and then attempting to rename() the file into
place would fail.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-01-22 14:32:09 Re: Dynamic Shared Memory stuff
Previous Message Kevin Grittner 2014-01-22 13:58:18 Re: Hard limit on WAL space used (because PANIC sucks)