Update cheatsheets

This commit is contained in:
ivuorinen
2025-10-19 00:22:04 +00:00
parent aa594e72af
commit 9c64f72b0c
25 changed files with 607 additions and 3 deletions

29
tldr/pg_rewind Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pg_rewind
> Synchronize a PostgreSQL data directory with another data directory that was forked from it.
> More information: <https://www.postgresql.org/docs/current/app-pgrewind.html>.
- Synchronize target directory with source directory:
`pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}}`
- Synchronize target with source server using connection string:
`pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-server {{connstr}}`
- Perform a dry run:
`pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}} {{[-n|--dry-run]}}`
- Show progress during synchronization:
`pg_rewind {{[-D|--target-pgdata]}} {{path/to/target_data}} --source-pgdata {{path/to/source_data}} {{[-P|--progress]}}`
- Display help:
`pg_rewind {{[-?|--help]}}`