- Walminer工具簡介
WalMiner是從PostgreSQL的WAL(write ahead logs)日志的解析工具矿卑,旨在挖掘wal日志所有的有用信息溉愁,從而提供PG的數(shù)據(jù)恢復支持,需要將數(shù)據(jù)庫日志級別配置需要大于minimal决乎。walminer3.0版本可以解析所有的DML語句與部分重要的DDL語句,從而可以提供數(shù)據(jù)恢復支持
2.版本支持
walminer3.0支持PostgreSQL 10及其以上版本。(此版本放棄對9.x的支持)
- Walminer3.0下載安裝
#安裝包下載地址
https://gitee.com/movead/XLogMiner/tree/walminer_3.0_stable/
4.安裝
#解壓
unzip XLogMiner-walminer_3.0_stable.zip
#授權(quán)
chown -R postgres.postgres /mnt/pgsql/XLogMiner-walminer_3.0_stable
#切換用戶
su - root
#添加環(huán)境變量
vim /etc/profile
export PGHOME=/mnt/pgsql
export PATH=$PGHOME/bin:$PATH
cd /mnt/pgsql/XLogMiner-walminer_3.0_stable/walminer
#編譯安裝
USE_PGXS=1 MAJORVERSION=12 make
#MAJORVERSION支持‘10’,‘11’,‘12’,‘13’,‘14’,‘15’,‘16’
USE_PGXS=1 MAJORVERSION=12 make install
4.查看當前PG庫所安裝的插件名稱
postgres=# select * from pg_available_extensions;
name | default_version | installed_version | comment
--------------------+-----------------+-------------------+----------------------------------------------------------------------
walminer | 3.0 | 3.0 | analyse wal to SQL
insert_username | 1.0 | | functions for tracking who changed a table
file_fdw | 1.0 | | foreign-data wrapper for flat file access
tsm_system_time | 1.0 | | TABLESAMPLE method which accepts time in milliseconds as a limit
unaccent | 1.1 | | text search dictionary that removes accents
adminpack | 1.1 | | administrative functions for PostgreSQL
hstore_plperlu | 1.0 | | transform between hstore and plperlu
fuzzystrmatch | 1.1 | | determine similarities and distance between strings
amcheck | 1.0 | | functions for verifying relation integrity
pltcl | 1.0 | | PL/Tcl procedural language