pgBackRest
pgbadger
Our great sponsors
pgBackRest | pgbadger | |
---|---|---|
13 | 6 | |
2,194 | 3,382 | |
4.5% | - | |
9.2 | 7.9 | |
7 days ago | about 2 months ago | |
C | Perl | |
GNU General Public License v3.0 or later | PostgreSQL License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pgBackRest
-
pgBackRest: PostgreSQL S3 backups
This tutorial explains how to backup PostgreSQL database using pgBackRest and S3.
-
Anything can be a message queue if you use it wrongly enough
This isn't theoretical; many companies do PostgreSQL async 1:N physical replication, by using e.g. https://pgbackrest.org/ to have the primary push WAL segment files (a.k.a. "the last n milliseconds of packets" in the write-ahead log) as objects to S3, and then to have all read-replicas fetch from S3 and replay.
> You could do even better if you out-of-band signal the readiness so you do not need to poll while idle.
S3 and its clones have "object lifecycle notifications", where you can be informed by a push-based mechanism whenever a new object is put into the bucket.
But — what do you have to do, to get these notifications?
Subscribe to a message queue that S3 puts them into.
-
Kubernetes postgres backups
I haven't explored the territory in awhile but for bare-metal, you can't go wrong with Percona Distribution, which includes pgBackRest and a minimal web-ui. No one ever got fired for using Percona, etc.
- pgBackRest - Reliable PostgreSQL Backup & Restore
- pgBackRest - have you used it and what was your experience?
-
How to backup database
Check out pgBackRest
-
Use One Big Server
I found this approach pretty cool in that regard: https://github.com/pgbackrest/pgbackrest
- Moving from Oracle to Postgres, what should I know?
-
How do you back up your databases?
Something like PG barman or pg backrest could be good for you on the Postgres side.
-
Cloud SQL is not great
Backups are limited. These days, pgbackrest is the go-to backup solution for PostgreSQL, and having used it I am very impressed so far. It provides full backups, differential, and incremental, as well as archiving of WAL segments for point in time recovery. It allows great flexibility in schedules and destinations for backups, how long to keep backups for, how many full backups. For example, you can have backups made to a local disk, and other backups to an external S3-compatible bucket, each with their own settings and schedules (e.g., scheduled via cron).
pgbadger
-
Site down due hosted on digitalocean
It might also help to use pgbadger or something similar to process your postgres logs and see whether some event is aligned with your outages.
-
SQL: 2023 Has Been Released
Interestingly, when a place does get to the point where the single instance has capacity issues (after upgrading to EPYC and lots of flash drives) then other non-obvious stuff shows up too.
For example, at one place just over a year ago they were well into this territory. One of weird problems for them was with pgBadger's memory usage (https://github.com/darold/pgbadger). That's written in perl, which doesn't seem to go garbage collection well. So even on a reporting node with a few hundred GB's of ram, it could take more than 24 hours to do a "monthly" reporting run.
There wasn't a solution in place at the time I left, so they're probably still having the issue... ;)
- Moving from Oracle to Postgres, what should I know?
-
What are the top 3 most useful things that you have hosted over the years?
First of all I used a profiler (pgbadger and netdata) to figure out where the lags were coming from. I then tried the usual stuff (increasing shared_buffers, max_wal_size, min_wal_size from their ultra low defaults), but the biggest performance gain came from moving the database from eMMC to a mechanical hard drive :-D
-
Best way to find queries that might benefit from indexes.
Look into PgBadger (a log parser/analyser): https://github.com/darold/pgbadger
What are some alternatives?
Barman - Barman - Backup and Recovery Manager for PostgreSQL
pgaudit_analyze - PostgreSQL Audit Analyzer
wal-g - Archival and Restoration for databases in the Cloud
Mailcow - mailcow: dockerized - 🐮 + 🐋 = 💕
docker-postgres-wale - Postgres docker container with WALE-E installed
minion - :octopus: Perl high performance job queue
wal-e - Continuous Archiving for Postgres
postgresqltuner - Simple script to analyse your PostgreSQL database configuration, and give tuning advice
pghoard - PostgreSQL® backup and restore service
Octopussy - Octopussy - Open Source Log Management Solution
postgres - Docker Official Image packaging for Postgres
apache2buddy - apache2buddy