F.34. page_repair#
F.34. page_repair #
Individual page repair module using standby’s data.
F.34.2. Installation #
Create page_repair extension on Tantor SE-1C
server.
$ psql =# CREATE EXTENSION page_repair CREATE EXTENSION
F.34.3. Usage #
page_repair extension provides the function
pg_repair_page(table regclass, block_number bigint, connstr text).
Where table and block_number
is the table name and corrupted block number, respectively.
connstr is the connection string to connect to
the standby server. The standby server that can be connected by
connstr must have the same system identifier as
the server on which this function is excuted. This function can be
executed on the master server and by superuser. If you want to
repair other forks such as freespace map, visibility map you can
use the function
pg_repair_page(table regclass, block_number bigint, connstr text, forkname text)
where forkname can be main,
fsm vm.
pg_repair_page acquires
AccessExclusiveLock on the target relation and
might wait for the standby server to catch up to the master
server. This function doesn’t attempt to repair the page that is
marked as dirty on the shared buffer because
the dirty page will be flushed to the disk and thereby could
repair the corrupted page.