The citext module provides a case-insensitive character string type, citext. Essentially, it internally calls
lower
when comparing values. Otherwise, it behaves almost exactly like text.
Bloom Filters in Postgres 9.6
First, I need to load the extension:
$ create extension bloom; CREATE EXTENSION
Now, I can create index:
$ CREATE INDEX bloomidx ON test using bloom (i1,i2,i3,i4,i5,i6,i7,i8,i9);
PostgreSQL backup and restore service
pghoard
is a PostgreSQL backup daemon and restore tooling for cloud object storages.Features:
- Automatic periodic basebackups
- Automatic transaction log (WAL/xlog) backups (using either
pg_receivexlog
orarchive_command
)- Cloud object storage support (AWS S3, Google Cloud, OpenStack Swift, Azure, Ceph)
- Backup restoration directly from object storage, compressed and encrypted
- Point-in-time-recovery (PITR)
- Initialize a new standby from object storage backups, automatically configured as a replicating hot-standby
Fault-resilience and monitoring:
- Persists over temporary object storage connectivity issues by retrying transfers
- Verifies WAL file headers before upload (backup) and after download (restore), so that e.g. files recycled by PostgreSQL are ignored
- Automatic history cleanup (backups and related WAL files older than N days)
archive_sync
tool for detecting holes in WAL backup streams and fixing them- Keeps statistics updated in a file on disk (for monitoring tools)
- Creates alert files on disk on problems (for monitoring tools)
Postgres TAP: Test Anything Protocol
pgTAP is a suite of database functions that make it easy to write TAP-emitting unit tests in psql scripts or xUnit-style test functions. The TAP output is suitable for harvesting, analysis, and reporting by a TAP harness, such as those used in Perl applications.
Why would you want to unit test your database? Well, there are a couple of scenarios in which it can be useful.