Copy-and-Replay vs Branch-at-a-Point: Two Backup Recovery Paths
A side-by-side comparison of copy-and-replay recovery and branch-at-a-point restores, showing why restore time scales with data size in one model and not the other.
Loading…
Topic
301 posts about Postgres. Every summary links to the original.
See the idea
A side-by-side comparison of copy-and-replay recovery and branch-at-a-point restores, showing why restore time scales with data size in one model and not the other.
Agent memory is the knowledge that survives a run, not the working state inside one. This explainer separates the two, then maps the write path, the read path, and the database limits that cap recall.
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Storage v3 adds resumable uploads, quality and format filters, a Next.js loader, WebP rendering, presigned upload URLs, and per-bucket size and file-type limits. Resumable uploads divide files into chunks, emit progress events, and allow interrupted transfers to continue; Pro Plan and higher users can upload files up to 50GB, up from 5GB. Rather than expose S3’s proprietary protocol, the implementation uses the open TUS protocol over HTTP through the Node.js Storage-API service and tus-node-server, with Postgres RLS integration. To support multiple TUS instances behind a load balancer, transactional Postgres Advisory locks serialize access to each S3 object and help address concurrent uploads, while the release rolls out gradually over the next month.
Supabase’s March 2023 update previews Launch Week 7, an accompanying Web3 AI hackathon, and a collection of community projects and resources. It announces a Next.js OpenAI documentation-search template hosted on Vercel, combining GPT-3 text completion, a Postgres database with pgvector, and Deno Edge Functions. The update also documents the Launch Week ticket system, including an AI-fueled design and an infinite ticket scroll built with Next.js, Framer Motion, and Supabase, with separate posts covering implementation and artwork generation. It additionally promotes the SupaClub April 1 announcement, a Launch Week kickoff Twitter Space, and projects such as Markprompt, which creates embeddings from Markdown, Markdoc, and MDX files in GitHub repositories using Next.js, Vercel, OpenAI, and Supabase.
Supabase Launch Week 7 needed distinctive, shareable tickets that could improve on earlier Launch Week designs while keeping overlaid text readable. The team experimented with Midjourney prompts and blends, then chose minimalist purple swirls and a gold overlay approach after finding generated visuals too chaotic and direct gold prompting unreliable. For each ticket, a Supabase Edge Function retrieves a cached PNG from Supabase Storage or renders HTML and CSS into an SVG with Vercel’s Satori, layering backgrounds, a GitHub profile picture, and text before uploading the result with long cache control. A Postgres view selectively exposes ticket fields, calculates referral counts and marks a ticket golden when both Twitter and LinkedIn sharing have been detected, while row-level security protects the underlying email-containing table. Supabase Realtime then sends client-side updates so users can see progress and stop listening once golden.
Supabase’s February 2023 beta update covers product changes across its dashboard, Auth, Postgres, Edge Functions, GraphQL, documentation, and community resources. GraphiQL is now built into the dashboard for exploring and querying pg_graphql APIs, while Docs search uses pgvector and OpenAI to support Supabase-specific questions. Supabase CLI 1.36+ can serve multiple Edge Functions simultaneously, and a multi-stage Postgres Dockerfile reduces the image from 1.3GB to 250MB, enabling faster boot time. The release also adds dashboard management for database roles, moves API documentation into the table editor with type-file generation, and provides a full OpenAPI 3.0 specification for Auth. Additional updates include inferred supabase-js response types, Deno 1.30.3 for Edge Functions, and Realtime behavior for deletes under RLS.
This tutorial shows how to build an Ionic Angular cross-platform app that stores and queries store locations with Supabase and PostGIS. It enables PostGIS, defines a stores table with a geography(POINT) location, adds a GiST spatial index, creates storage policies, and seeds example coordinates. SQL functions named nearby_stores and stores_in_view calculate distances or select stores inside a coordinate box, while Ionic uses Capacitor Google Maps and geolocation to display markers and query nearby data. The app also uploads store images to Supabase Storage, retrieves them with a 300-pixel contain transformation, and opens store details in an Ionic bottom-sheet modal after marker selection. The completed code is provided on GitHub and requires project and Google Maps credentials plus the included SQL.
PostgreSQL’s extensible type system can encode validation and presentation behavior for a custom Semantic Versioning (SemVer) type. The article stores major, minor, patch, pre-release, and build-metadata components in a composite type, then wraps that type in a domain whose check constraint rejects null or negative numeric components and invalid array elements. A SQL helper validates nullable arrays with regular expressions, and the domain automatically enforces these rules when values are inserted into a table. For ergonomics, a function formats the composite value as a SemVer string, while a stored generated column persists that representation; the article also notes possible parsers, operators, and aggregation functions. It concludes that the ceremony is worthwhile when data integrity is critical and the specification is stable or changes infrequently.
HappyTeams, a bootstrapped startup, needed its database to support thousands of users and continued feature development without consuming scarce technical resources. Its Heroku Postgres deployment had developed scaling problems, including sluggish or uneven performance and limits on concurrent connections, prompting a database change during an application rebuild in early 2022. The company migrated to Supabase in less than an hour using pg_dump and pg_restore, and adopted PgBouncer for connection pooling; it selected the service for performance, connection flexibility, support and documentation, onboarding, and lower costs. The source reports that Supabase removed the performance issue, made pooling effortless, and helped HappyTeams release features faster, including a comments feature completed in two days, while the company considered expanding into Edge Functions and the API client.
Supabase’s January 2023 beta update gathers releases across Postgres, GraphQL, Edge Functions, client libraries, image transformation, and self-hosting. The update adds pgvector, a PostgreSQL extension for storing OpenAI embeddings and performing vector similarity search, and presents Supabase Clippy, a one-week, fully open-source documentation-search MVP combining pgvector with OpenAI. pg_graphql now supports Views, Materialized Views, and Foreign Tables, while Image Transformations enable automatic WebP conversion by default, with format: origin available to opt out. Other changes include Python and C# reference documentation, pg_repack, multi-tab authentication logout through BroadcastChannel, lz4 compression, ICU locales, downloadable Edge Function source, and a DigitalOcean deployment guide using Sendgrid, Packer, and Terraform. Supabase also reports reaching 45,000 GitHub stars and a position among the top 200 most-popular repositories.
Supabase introduced “Supabase Clippy,” a ChatGPT-like interface trained on its documentation, as a hidden MVP in the Supabase docs. It responds to questions by retrieving relevant documentation and streaming GPT-3's answer in realtime. The implementation parses docs into sections, creates OpenAI embeddings, stores them in Postgres with pgvector, and injects matching documents as context for generation. The project was motivated by the growth of Supabase's product suite and documentation, plus the need to support developers unfamiliar with Postgres; the current version uses only Guides and is presented as a one-week MVP intended to gather feedback. Planned directions include adding reference docs and community discussions, caching repeated queries, thumbs-up relevance feedback, and interactive guidance.
Post describes how embeddings represent semantic relatedness as vectors and how OpenAI’s text-embedding-ada-002 model produces 1536-dimensional embeddings for text. It addresses storing and searching large or dynamically changing collections that may not fit comfortably in memory, using PostgreSQL and the pgvector extension instead of a small CSV-and-NumPy workflow. The implementation enables the vector extension, creates a documents table with a vector(1536) column, and defines match_documents() with cosine distance, thresholds, counts, and ordering. It also shows JavaScript code for generating embeddings, a search flow that retrieves matching documents for prompt context, and token limiting before a completion request, while noting that documents can be chunked. For larger tables, the post recommends an ivfflat index with vector_cosine_ops and gives 4 * sqrt(table_rows) as a starting point for lists.
Supabase's December 2022 beta update recaps Launch Week 6, Community Day, Postgres ecosystem work, and other recent releases. The announcements include redesigned documentation rebuilt with Next.js; Storage v2 features for image resizing, webhooks, and a Smart CDN; and multi-factor authentication with optional enforcement through Row Level Security. Supabase Wrappers extend PostgreSQL Foreign Data Wrappers to query external databases, systems, and third-party APIs using SQL, while The Vault enters beta for encrypted secrets and stored data. The update also announces custom domains, point-in-time recovery, SSO on the dashboard in preparation for SAML, and ecosystem projects including pg_graphql v1.0, a PostgREST 11 pre-release, and an experimental pg_crdt extension.
Supabase’s Launch Week Day 6 wrap-up consolidates the products and platform changes announced during the event. The roundup announces redesigned Next.js documentation, Storage v2 features for image resizing, webhooks, and a Smart CDN, plus multi-factor authentication usable in Row Level Security policies. It also introduces Wrappers, an Alpha framework for connecting Postgres to external systems, Vault for encrypted secrets, and pg_graphql 1.0 with general availability. Additional releases include dashboard-enabled point-in-time recovery for Pro Projects, custom domains, pg_crdt, PostgreSQL 15 for new projects, a PostgREST 11 pre-release, and the PGroonga multilingual full-text search extension. Community partnerships with Flutterflow and OneSignal provide Flutter app development and push-notification integrations.
PostgreSQL 15, released as a stable version in October 2022, adds security, performance, SQL, replication, logging, compression, and string-processing changes. CREATE permission is revoked from all users except the database owner, views can use caller permissions with security_invoker=on, and sorting is reported up to four times faster for in-memory and on-disk workloads; window functions also improve. The release introduces MERGE, supports two-phase commits and selective data in logical replication, allows conflicting transactions to be skipped or subscriptions disabled, and enables parallel workers for SELECT DISTINCT. It also adds JSON logging, Zstandard and ZL4 compression for WAL and pg_basebackup, and POSIX regexp functions such as regexp_substr() and regexp_count(). The post recommends upgrading for bug fixes and stability, while noting that migrated databases may need manual permission changes and upgrades should be checked for rare manual actions.
pg_graphql 1.0 marks the general availability of a PostgreSQL extension that lets databases be queried with GraphQL and formalizes a SemVer-based guarantee against backward-incompatible changes. It was designed for Supabase Free Plan servers with 1 GB of memory, where alternatives such as Hasura and Graphile consumed more memory than the platform could sacrifice. The implementation began with a C parser and SQL transpiler exposed through PostgREST RPC, then moved from SQL to Rust after nested SQL functions, copied state, and JSONB AST processing slowed schema introspection; v0.5.0 completed the rewrite. On Free Plan hardware, version 1.0 adds less than 300 microseconds per request, reaches about 1,060 SQL queries per second per connection, and the full Auth and HTTP stack handles about 645 requests per second, while larger instances exceed 10,000 requests per second.
PostgREST 11 is still in pre-release, with the latest features and fixes available through the Supabase CLI rather than Supabase Cloud. The update improves querying related data with spread operators that flatten one-to-one and many-to-one relationships into the response, avoiding an extra view or function for that shape. Related-table ordering is also supported, such as ordering films by technical_specs.duration, with the same relationship limitation. Anti-joins and inner-join behavior can be expressed by filtering related resources with is.null or not.is.null; the latter can also be combined with an or filter and is more flexible than the existing !inner modifier. The release can be tried locally with supabase start, and the post asks users to report bugs, suggestions, and ideas.
Supabase Vault is a Postgres extension and accompanying dashboard UI for storing encrypted secrets and encrypting data in database tables, released progressively across the platform and later made available on all Supabase projects. It stores secrets and encryption keys using authenticated encryption on disk, exposes decrypted secrets through a Postgres view, and lets applications use them from SQL in functions, triggers, and webhooks. Its foundation is pgsodium Transparent Column Encryption (TCE), which can encrypt text or bytea values, authenticate associated row columns, and create row-by-row decryption views for encrypted columns. Encryption keys are kept outside the database while only key IDs are stored with encrypted data; Supabase manages root keys in internal backend systems and offers an alternate dashboard endpoint for external decryption, while the post also outlines possible future end-to-end, group, and public-key encryption features.
Supabase Wrappers is an Alpha framework for building PostgreSQL Foreign Data Wrappers that connect databases with external systems, including third-party APIs, through SQL. It initially supports Firebase and Stripe, while wrappers for ClickHouse, BigQuery, and Airtable are under development. The framework extends pgx, a Rust Postgres extension framework, with async support for RESTful API-based wrappers and limited push-down support currently provided as a proof of concept. The post presents Wrappers as a basis for QETL, allowing teams to query, extract, transform, and load remote data through Postgres, either on demand or into local tables, while joining it with operational data. It is released outside official platform support, with potential breaking changes.
Supabase announces the release of multi-factor authentication (MFA) for everyone and describes dashboard Single Sign-On (SSO) as preparation for a future SAML release; SSO is available on Enterprise plans by contacting the company. The implementation starts with Time-Based One-Time Passwords (TOTP), where an authenticator generates a short-lived code from a shared secret and the current time, exchanged through a QR code or entered manually. Enrollment uses /enroll, /challenge, and /verify, while subsequent sign-ins require a challenge and verification before a JWT is issued with Authenticator Assurance Level (AAL) and Authenticator Method Reference (AMR) claims. Those claims support full or selective enforcement through restrictive Postgres Row Level Security policies, including checks that require aal2 or require it only for users with verified MFA factors; planned additions include WebAuthn, FIDO2 devices, and email notifications.
Supabase announces pg_crdt, an experimental Postgres extension that adds CRDT support as a data type for collaborative and offline-oriented applications. It frames CRDTs as structures whose updates can be merged in any order to reach the same final state, avoiding the last-write-wins behavior of ordinary arrays. A content column can use crdt.ydoc, backed by Yjs, while the extension also supports Automerge through Rust libraries wrapped with pgx. The post contrasts storing CRDTs directly in Postgres with making Realtime an authoritative server, favoring the database-centered approach for simpler architecture and broader tooling, while noting that the decision is unsettled and pg_crdt is not released on the Supabase platform. Known limitations include full-document WAL broadcasts, increased WAL and dead tuples for frequently updated documents, and serialization overhead for large CRDT values.
Supabase’s November 2022 update previews Launch Week 6 while reporting a smaller set of product releases and community activity. Remix Auth Helpers are now available for server-side authentication, updated for supabase-js V2 and usable with TypeScript; the post also introduces the Edgy Edge Functions YouTube series and three examples covering OG image generation, Oak API servers, and Puppeteer screenshots. Product fixes address auth.signOut cookies and session removal, magic links can be customized with {{ .TokenHash }}, functions support redirects, and Supabase can be installed through Conda. The update also announces a Fireship course building a Reddit-inspired app with Supabase, PostgreSQL, and React, alongside a broad list of community resources and projects.
The best engineering reads, once a week.