pg_orphaned
Deal with orphaned files
Repository
bdrouvot/pg_orphaned
https://github.com/bdrouvot/pg_orphaned
Source
pg_orphaned-1.0.tar.gz
pg_orphaned-1.0.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_orphaned | 1.0 | ADMIN | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 5200 | pg_orphaned | No | Yes | No | Yes | No | No | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | pg_orphaned | - |
| RPM | PIGSTY | 1.0 | 1817161514 | pg_orphaned_$v | - |
| DEB | PIGSTY | 1.0 | 1817161514 | postgresql-$v-pg-orphaned | - |
Build
You can build the RPM / DEB packages for pg_orphaned using pig build:
Install
You can install pg_orphaned directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
pg_orphaned provides functions to detect and manage orphaned data files in PostgreSQL. It handles corner cases like in-progress transactions that could cause false positives by using a dirty snapshot.
List Orphaned Files
Returns: dbname, path, name, size, mod_time, relfilenode, reloid, older (boolean).
Move Orphaned Files to Backup
List Moved Files
Move Files Back (if still orphaned)
Remove Moved Files
Typical Workflow
Note: functions operate on orphaned files for the database you are connected to. Always double-check carefully before moving or removing files.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)