November 2019
Beginner to intermediate
470 pages
11h 59m
English
If you are facing storage corruption or some other storage-related problem that may be related to bad blocks in a table, the pageinspect extension may be the module you are looking for. We will begin by creating the extension, as shown in the following example:
test=# CREATE EXTENSION pageinspect;CREATE EXTENSION
The idea behind pageinspect is to provide you with a module that allows you to inspect a table on the binary level.
When using this module, the most important thing to do is fetch a block:
test=# SELECT * FROM get_raw_page('pg_class', 0);...
This function will return a single block. In the preceding example, it is the first block in the pg_class parameter, which is a system table. Of course, it ...
Read now
Unlock full access