Crash in virtual file descriptor FDDEBUG code

Greg Nancarrow <gregn4422@gmail.com>

From: Greg Nancarrow <gregn4422@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-11-17T00:11:22Z
Lists: pgsql-hackers

Attachments

Hi Hackers,

While investigating a possible file-descriptor issue, I enabled the
FDDEBUG code in src/backend/storage/file/fd.c, only to find that it
resulted in a crash as soon as it was invoked.
It turns out the crash was in some logging code that was being passed
a NULL fileName.
I've attached a small patch that corrects the issue.

Regards,
Greg Nancarrow
Fujitsu Australia

Commits

  1. Don't Insert() a VFD entry until it's fully built.