Обсуждение: Proposal: Allow excluding specific file patterns in pg_checksums
Hi, I’ve hit the same issue as PGroonga GitHub Issue #233 [1]: PGroonga-related files trigger pg_checksums verification failures. I’d like to propose a feature: Add support to pg_checksums for excluding files matching custom patterns. This can handle compatibility with extensions like PGroonga that generate files within the PostgreSQL data directory. Best regards, XYenon [1] https://github.com/pgroonga/pgroonga/issues/233
Putting files inside base/ is just a bad idea. Even if you handle pg_checksums and pg_basebackup, external tools like pgbackrest will have issues as well. I think better solutions are one of:
* Store these non-Postgres files somewhere else. Can still be in the data directory
* Make sure the files have valid checksums
Cheers,
Greg
--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support
> On 23 Oct 2025, at 16:39, Greg Sabino Mullane <htamfids@gmail.com> wrote: > > Putting files inside base/ is just a bad idea. Even if you handle pg_checksums and pg_basebackup, external tools like pgbackrestwill have issues as well. Agreed. -- Daniel Gustafsson
Hi all,
Thanks Greg and Daniel for the helpful feedback and suggestions.
Following your advice, we're considering moving PGroonga's database-specific
files out of the `base/` directory to avoid interference with `pg_checksums`.
Specifically, we're exploring placing them under a path such as
`pgroonga/${DB_OID}/pgrn*`.
This approach would likely resolve the checksum verification issue without
requiring any PostgreSQL changes.
Here's a brief summary of what we've verified so far:
- Files under `base/` indeed trigger `pg_checksums` verification failures.
- Moving the same files to `$PGDATA/pgroonga/` allowed checksum verification to
complete successfully.
- `pg_basebackup` includes files and directories placed directly under the
PostgreSQL data directory, not only `base/`. So our proposed new location
would still be included in backups.
- According to the PostgreSQL source code, `pg_checksums` checks only the
following directories. Therefore, files under `$PGDATA/pgroonga/` are safely
excluded.
- `global/`
- `base/`
- `pg_tblspc/`
We'll continue testing this approach to confirm compatibility and performance
before finalizing the change.
Thanks again for the discussion and insights that helped guide our direction.
Best regards,
Yasuhiro Horimoto
PGroonga Team