Skip to content
tezvyn:

Search

Find a bite, explore a topic or look for a role.

Results for PostgreSQL

Bites 111

Docker & Kubernetes1 min read

Persist PostgreSQL data across compose down

Define a named volume and mount it at the database's data directory (/var/lib/postgresql/data); named volumes survive compose down.

Growth & Experimentation2 min read

Compare PostgreSQL versus a columnar warehouse for raw event data

Contrast row vs column storage, compression, and scan speed; note Postgres suits OLTP and point lookups while columnar stores excel at aggregations.

PostgreSQL's Free Space Map: Finding Room to Write
Databases & Architecture2 min read

PostgreSQL's Free Space Map: Finding Room to Write

A Free Space Map is a table of contents for empty space in a Postgres table. It lets Postgres quickly find a page with enough room for a new row or index entry, avoiding a slow scan. It's used on every INSERT/UPDATE.

Databases & Architecture2 min read

Single-Leader Replication: One Node to Rule Them All

Think of a single source of truth. One 'leader' server takes all writes, while 'follower' servers handle read traffic. This is the default for many databases like PostgreSQL and MongoDB to scale reads.

Databases & Architecture2 min read

Amazon RDS: Managed Relational Databases in the Cloud

Amazon RDS is like hiring a DBA to manage your database's plumbing. It's for when you need a SQL database like PostgreSQL or MySQL without the hassle of patching and backups. The footgun is assuming it's 'serverless'—you still manage cost and performance.

Databases & Architecture2 min read

Serializable Snapshot Isolation: True Serializability Without Heavy Locking

SSI upgrades Snapshot Isolation to true serializability. It optimistically lets transactions run, but aborts one if a dangerous read-write dependency arises. This prevents subtle data corruption in systems like PostgreSQL without heavy locking.

MVCC: Read and Write Data Without Blocking Each Other
Databases & Architecture2 min read

MVCC: Read and Write Data Without Blocking Each Other

MVCC avoids slow, traditional locks by giving each transaction its own consistent data snapshot. This allows readers and writers to work at the same time without blocking each other, boosting performance in databases like PostgreSQL.

DBMS: The Software That Runs Your Database
Databases & Architecture2 min read

DBMS: The Software That Runs Your Database

A DBMS is the software engine that manages a database, separating your app from raw data files. You use it to query, update, and administer data, like with PostgreSQL or MySQL. The common footgun is confusing the DBMS with the database itself.

Node.js & Express1 min read

Environment configuration and secrets management in Node.js?

Use environment variables, load from .env file (dev only), never commit secrets.

Docker & Kubernetes1 min read

Bind mounts vs named volumes for persisting Docker data?

Persist data outside the writable container layer via a bind mount (a host path you control) or a named volume (Docker-managed under its data dir, portable and the recommended default).

Docker & Kubernetes1 min read

Bind mounts versus named volumes

A bind mount maps a host path into the container (great for live source in dev); a named volume is Docker-managed storage decoupled from the host layout (ideal for database data).

Databases & Architecture1 min read

Aurora vs Spanner architecture contrast

Aurora is single-writer with a shared distributed log-based storage and quorum, scaling reads; Spanner shards data with Paxos and TrueTime for global writes.

Databases & Architecture1 min read

Near-zero-downtime database migration to cloud

Assess and provision, do a full load then continuous CDC replication with a tool like DMS, validate, then cut over with a rollback plan.

Databases & Architecture1 min read

Managed RDS vs self-managed DB on EC2

Managed RDS offloads patching, backups, failover, and replication, freeing the team to build product; self-managed EC2 means you own all that toil.

Databases & Architecture1 min read

Purpose of database drivers (JDBC/ODBC)

A driver translates a standard API into each database's wire protocol, so app code stays portable across vendors.

Databases & Architecture1 min read

Point-in-Time Recovery (PITR)

Restore a base backup then replay archived write-ahead logs up to a chosen moment, enabling recovery to just before an error.

Databases & Architecture2 min read

Apply the CAP theorem to a real system

Define C, A, P; note partitions are unavoidable, so the real choice during one is consistency versus availability; then classify a system as CP or AP with reasoning.

Databases & Architecture1 min read

What is database replication and why use it?

Replication keeps copies of data on multiple servers; primary benefits are high availability through failover and improved read scalability by spreading reads.

Databases & Architecture1 min read

How do you choose between relational and NoSQL databases?

Relational gives schema, joins, and ACID for structured related data; document gives flexible schema and horizontal scale for varied or denormalized data.

Databases & Architecture2 min read

How does a hash join handle memory overflow?

The build table is partitioned by hash and spilled to disk, then probe rows are partitioned the same way, and pairs are joined per partition.