![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
One-shot import of the legacy per-relation metadata file. More...
#include <string>#include <unistd.h>#include "postgres.h"#include "catalog/pg_type.h"#include "common/relpath.h"#include "executor/spi.h"#include "fmgr.h"#include "miscadmin.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/syscache.h"#include "provsql_utils.h"#include "MMappedTableInfo.h"#include "MMappedVector.hpp"
Go to the source code of this file.
Functions | |
| static const char * | kindLabel (uint8_t kind) |
Textual label of a persisted provsql_table_kind value. | |
| Datum | migrate_table_info (PG_FUNCTION_ARGS) |
Import the legacy metadata file into provsql.table_info. | |
Variables | |
| static constexpr uint64_t | LEGACY_TABLE_INFO_MAGIC |
Magic of the legacy provsql_table_info.mmap header ("PvSTblIn"), as written by ProvSQL 1.6.0 to 1.12.0. | |
One-shot import of the legacy per-relation metadata file.
Before ProvSQL 1.13.0, the per-relation TID / BID / OPAQUE metadata lived in a fifth mmap file, provsql_table_info.mmap, alongside the circuit store; it now lives in the provsql.table_info heap table (see table_info.c). provsql.migrate_table_info() reads the old file, when the database still has one, and inserts every record it holds that the table does not already carry.
The file is read directly by the calling backend, read-only: nothing writes it any more, so there is no worker round-trip and no locking to arrange. Records for relations that no longer exist are skipped (the old file had no way to drop an entry for a relation dropped while the extension was absent).
Definition in file TableInfoMigrate.cpp.
|
static |
Textual label of a persisted provsql_table_kind value.
Definition at line 45 of file TableInfoMigrate.cpp.

| Datum migrate_table_info | ( | PG_FUNCTION_ARGS | ) |
Import the legacy metadata file into provsql.table_info.
Definition at line 63 of file TableInfoMigrate.cpp.

|
staticconstexpr |
Magic of the legacy provsql_table_info.mmap header ("PvSTblIn"), as written by ProvSQL 1.6.0 to 1.12.0.
Definition at line 40 of file TableInfoMigrate.cpp.