char *path;
File fd;
- if (isRedo && reln->md_fd[forkNum] != NULL)
+ /*
+ * During bootstrap, there are cases where a system relation will be
+ * accessed (by internal backend processes) before the bootstrap
+ * script nominally creates it. Therefore, allow the file to exist
+ * already, even if isRedo is not set. (See also mdopen)
+ */
+ if ((IsBootstrapProcessingMode() || isRedo) && reln->md_fd[forkNum] != NULL)
return; /* created and opened already... */
Assert(reln->md_fd[forkNum] == NULL);
{
int save_errno = errno;
- /*
- * During bootstrap, there are cases where a system relation will be
- * accessed (by internal backend processes) before the bootstrap
- * script nominally creates it. Therefore, allow the file to exist
- * already, even if isRedo is not set. (See also mdopen)
- */
+ /* see comment above */
if (isRedo || IsBootstrapProcessingMode())
fd = PathNameOpenFile(path, O_RDWR | PG_BINARY, 0600);
if (fd < 0)