PGMONETA-WALFILTER(1)

πŸ“¦
version 0.21.0 Β· 2 versions
, in nixos 26.05

πŸ’… pgmoneta-walfilter β€” the WAL girlie's bestie

Okay so picture this: it's giving manual page, it's giving section 1 of the manual (that's general commands, iykyk), and the whole vibe is pgmoneta-walfilter. That's the name, bestie, and honestly? She's a whole command line utility that filters Write-Ahead Log (WAL) files based on user-defined rules. Periodt.


✨ SYNOPSIS ✨

pgmoneta-walfilter [OPTIONS] yaml_config_file

That's it. Options, then your YAML config file. Slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

So pgmoneta-walfilter is a command-line utility that reads PostgreSQL Write-Ahead Log (WAL) files from a source directory, filters them based on user-defined rules, recalculates CRC checksums, and writes the filtered WAL files to a target directory. Like, she reads the WAL, she does her little filter thing, she fixes the checksums, she drops the results somewhere else. Iconic behavior honestly.

🌸 Filtering Rules 🌸

The tool supports two types of filtering. Two! Not one! She's versatile:

  1. Transaction ID (XID) filtering β€” filter out specific transaction IDs. You literally just specify a list of XIDs to remove from the WAL stream. Bye bye, those transactions. 🫢
  2. Operation-based filtering β€” filter out specific database operations:
    • DELETE: removes all DELETE operations and their associated transactions. Not just the op β€” the transactions that came with it too. She's thorough.

πŸŽ€ ARGUMENTS πŸŽ€

  • yaml_config_file β€” the path to the YAML configuration file that specifies source and target directories and settings. Your little instruction sheet. Do not lose it. 😭

πŸ‘‘ CONFIGURATION πŸ‘‘

The tool uses a YAML configuration file with the following structure:

πŸ’€ real talk: the original manpage actually has a build warning sitting right here β€” System Message: WARNING/2 (/build/source/doc/man/pgmoneta-walfilter.1.rst:, line 40) followed by Cannot analyze code. Pygments package not found. β€” because the docs build machine didn't have Pygments installed. Not me making that up, that's genuinely in there. Anyway, here's the YAML it was trying to show you:
source_dir: /path/to/source/backup/directory
target_dir: /path/to/target/directory
configuration_file: /etc/pgmoneta/pgmoneta_walfilter.conf
rules:                             # Optional: filtering rules
  - xids:                          # Filter by transaction IDs
    - 752
    - 753

🌈 Configuration Parameters 🌈

  • source_dir (required) β€” source directory containing the backup and WAL files. Required, so don't skip her. πŸ’…
  • target_dir (required) β€” target directory where filtered WAL files will be written. Also required. Matching set, bestie.
  • configuration_file (optional) β€” path to the pgmoneta_walfilter.conf file.
  • rules (optional) β€” filtering rules to apply to WAL files.
  • rules.xids (optional) β€” array of transaction IDs (XIDs) to filter out.
  • rules.operations (optional) β€” array of operations to filter out.

🧚 HOW IT WORKS 🧚

The whole pipeline, step by step, main character energy only:

  1. Read Configuration β€” parses the YAML configuration file. Reads the sheet, understands the sheet. ⭐
  2. Load WAL Files β€” reads all WAL files from the source directory. All of them. No skipping.
  3. Apply Filters β€” applies the specified filtering rules:
    • Filters out records matching specified operations if specified
    • Filters out records with specified transaction IDs if specified (XIDs)
    • Converts filtered records to NOOP operations
  4. Recalculate CRCs β€” updates checksums for modified records. Because you can't just change records and leave the checksums stale, that's giving chaos. πŸ”₯
  5. Write Output β€” saves filtered WAL files to the target directory. Done and dusted. πŸŽ€

πŸ’– EXAMPLES πŸ’–

Basic usage with a configuration file:

(same build warning situation here β€” System Message: WARNING/2 (/build/source/doc/man/pgmoneta-walfilter.1.rst:, line 89), Cannot analyze code. Pygments package not found. β€” the shell block below is what it wanted to render.)
pgmoneta-walfilter [<OPTIONS>] filter_config.yaml

Example with filtering rules:

(and once more β€” System Message: WARNING/2 (/build/source/doc/man/pgmoneta-walfilter.1.rst:, line 95), Cannot analyze code. Pygments package not found. You know the drill by now. πŸ™ˆ)
source_dir: /path/to/source/backup/directory
target_dir: /path/to/target/directory
configuration_file: /etc/pgmoneta/pgmoneta_walfilter.conf
rules:
  - xids:
    - 752
    - 753

πŸ“ Log Files πŸ“

The tool uses the logging configuration from pgmoneta_walfilter.conf. Check the log file specified in the configuration for detailed error messages and processing information. She journals. She's emotionally aware. Check the log. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

  • pgmoneta-walinfo (1)
  • pgmoneta (1)
  • pgmoneta-cli (1)

For more detailed information, see the pgmoneta documentation at <https://pgmoneta.github.io/> ✨


and that's the whole page, bestie 🫢 β€” this was pgmoneta-walfilter(), straight outta the pgmoneta docs over at pgmoneta.github.io, and the footer had nothing else to say for itself. mwah πŸ’‹

πŸ“¦ where this page comes from