checking return value from unlink in write_relcache_init_file

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: checking return value from unlink in write_relcache_init_file
Date: 2021-06-03 22:44:13
Message-ID: CALNJ-vT-oSAO7yDQ6bQuXbAtJ9=zTznLidoMJ3CBs2EYQUuu3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I was looking at write_relcache_init_file() where an attempt is made to
unlink the tempfilename.

However, the return value is not checked.
If the tempfilename is not removed (the file exists), I think we should log
a warning and proceed.

Please comment on the proposed patch.

Thanks

Attachment Content-Type Size
check-unlink-return-init-file.patch application/octet-stream 790 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-06-03 22:54:14 Re: checking return value from unlink in write_relcache_init_file
Previous Message Isaac Morland 2021-06-03 22:29:29 Re: DELETE CASCADE