/* non-export function prototypes */
static void apply_map_update(RelMapFile *map, Oid relationId, Oid fileNode,
- bool add_okay);
+ bool add_okay);
static void merge_map_updates(RelMapFile *map, const RelMapFile *updates,
- bool add_okay);
+ bool add_okay);
static void load_relmap_file(bool shared);
static void write_relmap_file(bool shared, RelMapFile *newmap,
- bool write_wal, bool send_sinval, bool preserve_files,
- Oid dbid, Oid tsid, const char *dbpath);
+ bool write_wal, bool send_sinval, bool preserve_files,
+ Oid dbid, Oid tsid, const char *dbpath);
static void perform_relmap_update(bool shared, const RelMapFile *updates);
void
SerializeRelationMap(Size maxSize, char *startAddress)
{
- SerializedActiveRelMaps *relmaps;
+ SerializedActiveRelMaps *relmaps;
Assert(maxSize >= EstimateRelationMapSpace());
void
RestoreRelationMap(char *startAddress)
{
- SerializedActiveRelMaps *relmaps;
+ SerializedActiveRelMaps *relmaps;
if (active_shared_updates.num_mappings != 0 ||
active_local_updates.num_mappings != 0 ||
}
pgstat_report_wait_end();
- CloseTransientFile(fd);
+ if (CloseTransientFile(fd) != 0)
+ ereport(FATAL,
+ (errcode_for_file_access(),
+ errmsg("could not close file \"%s\": %m",
+ mapfilename)));
/* check for correct magic number, etc */
if (map->magic != RELMAPPER_FILEMAGIC ||
mapfilename)));
pgstat_report_wait_end();
- if (CloseTransientFile(fd))
+ if (CloseTransientFile(fd) != 0)
ereport(ERROR,
(errcode_for_file_access(),
errmsg("could not close file \"%s\": %m",