Workaround for pg_dump non-idempotent behaviour

Problem
=======

* `pg_dump` may dump the data rows in arbitrary order. This messes with
  the final hash of the dump file, even though the data after restoring
  would be same. This creates additional uploads with no value

Solution
========

* Utilize `pgdump-sort` script by `tigra564`, which attempts to sort
  data in the dump file specifically for hashing purposes.
This commit is contained in:
2022-12-26 12:35:38 -08:00
parent fddd8e84dd
commit 9702287a92
3 changed files with 287 additions and 7 deletions

View File

@@ -4,10 +4,13 @@
* systemd
* [AWS client](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
* python3
* docopt
* [pgdump-sort](https://github.com/tigra564/pgdump-sort) (Bundled)
### Install
* Run `aws configure`
* Symlink unit files to `/etc/systemd/system`
* Run `systemctl enable` on units and slices
* Run `systemctl start` on timers
* Run `systemctl start` on timers