Re: checking return value from unlink in write_relcache_init_file

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: checking return value from unlink in write_relcache_init_file
Date: 2021-06-04 00:55:57
Message-ID: 202106040055.zkuodwr4lwq7@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Jun-03, Tom Lane wrote:

> If the unlink fails, there's only really a problem if the subsequent
> open() fails to overwrite the file --- and that stanza is perfectly
> capable of complaining for itself. So I think the code is fine and
> there's no need for a separate message about the unlink. Refusing to
> proceed, as you've done here, is strictly worse than what we have.

It does seem to deserve a comment explaining this.

--
Álvaro Herrera Valdivia, Chile
"Pensar que el espectro que vemos es ilusorio no lo despoja de espanto,
sólo le suma el nuevo terror de la locura" (Perelandra, C.S. Lewis)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-06-04 01:09:56 Re: BUG #16079: Question Regarding the BUG #16064
Previous Message Jeff Davis 2021-06-04 00:52:24 Re: RFC: Table access methods and scans