Re: checking return value from unlink in write_relcache_init_file

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: checking return value from unlink in write_relcache_init_file
Date: 2021-06-03 22:56:55
Message-ID: 105010.1622761015@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zhihong Yu <zyu(at)yugabyte(dot)com> writes:
> Please comment on the proposed patch.

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-06-03 23:30:55 Re: Performance degradation of REFRESH MATERIALIZED VIEW
Previous Message Justin Pryzby 2021-06-03 22:54:14 Re: checking return value from unlink in write_relcache_init_file