Introducing Crunchy Data Warehouse: A next-generation Postgres-native data warehouse. Crunchy Data Warehouse Learn more

Latest posts from Craig Kerstiens

  • 8 min read

    A change to ResultRelInfo - A Near Miss with Postgres 17.1

    Craig Kerstiens

    Since its inception Crunchy Data has released new builds and packages of Postgres on the day community packages are released. Yesterday's minor version release was the first time we made the decision to press pause on a release. Why did we not release it immediately? There appeared to be a very real risk of breaking existing installations. Let's back up and walk through a near miss of Postgres release day.

    Yesterday when Postgres 17.1 was released there appeared to be breaking changes in the Application Build Interface (ABI). The ABI is the contract that exists between PostgreSQL and its extensions. Initial reports showed that a number of extensions could be affected, triggering warning sirens

    Read More
  • 4 min read

    pg_parquet: An Extension to Connect Postgres and Parquet

    Craig Kerstiens

    Today, we’re excited to release pg_parquet - an open source Postgres extension for working with Parquet files. The extension reads and writes parquet files to local disk or to S3 natively from Postgres. With pg_parquet you're able to:

    • Export tables or queries from Postgres to Parquet files
    • Ingest data from Parquet files to Postgres
    • Inspect the schema and metadata of existing Parquet files

    Code is available at: https://github.com/CrunchyData/pg_parquet/.

    Read on for more background on why we built pg_parquet or jump below to get a walkthrough of working with it.

    Read More
  • 1 min read

    Announcing the Scheduler for Crunchy Bridge

    Craig Kerstiens

    Today we're excited to announce a new scheduler for Crunchy Bridge. Scheduler makes it easy for you to create and manage automated database maintenance tasks such as:

    Read More
  • 3 min read

    Row Level Security for Tenants in Postgres

    Craig Kerstiens

    Row-level security (RLS) in Postgres is a feature that allows you to control which rows a user is allowed to access in a particular table. It enables you to define security policies at the row level based on certain conditions, such as user roles or specific attributes in the data. Most commonly this is used to limit access based on the database user connecting, but it can also be handy to ensure data safety for multi-tenant applications.

    Creating tables with row level security

    Read More
  • 4 min read

    Migrate from Heroku Postgres to Crunchy Bridge

    Craig Kerstiens

    While database migrations are not an everyday thing for you, they are for us.

    Migrating to a new database provider isn't something you ever take lightly. Once you've come to the decision that you may want to migrate then you look at the time and effort cost of switching, only to wonder if it's really worth it. You decide it is, and still you're left with uncertainty of what-if:

    • What about Postgres versions?
    • What about Postgres extensions?
    • What about collations?
    • How do you minimize cutover time while not spending 6 months doing some custom application double writing?
    • What about performance, how do you test to know you'll be safe ahead of time and not immediately put stress on your newly migrated database?
    Read More
  • 5 min read

    Crunchy Bridge: Announcing Postgres Insights in Your CLI

    Craig Kerstiens

    Today we're excited to release a big update to our Crunchy Bridge CLI: a new interactive menu for psql! Now when connecting to your Crunchy Bridge database with cb psql you'll have a :menu option. The cb menu is an easy to navigate collection of insights about your database. All of these insights are powered by data already contained in Postgres system catalogs. We have these same database insights in the dashboard, so this feature extends that to those working directly from the command line.

    Before we added this new Bridge CLI, you had to find your own system catalog queries. You had to know which catalogs existed, where to find some community queries, and had to construct things basically from scratch. Now with a simple command you can get the insights you need and stay in the flow of developing or debugging:

    Cache
      1 – Cache and index hit rates
    Size Information
      2 – Database sizes
      3 – Table sizes
    Query Performance
      4 – Queries consuming the most system time
      5 – Queries running over 1 minute
      6 – Slowest average queries
    Connection Management
      7 – Connection count by state
      8 – Connection count by user and application
    Indexes
      9 – Duplicate indexes
      10 – List of indexes
      11 – Unused indexes
    Locks
      12 – Blocking queries
    Extensions
      13 – Available extensions
      14 – Installed extensions
    
    Read More
  • 3 min read

    Citus for Postgres on Any Cloud: Announcing Citus Support for Crunchy Bridge

    Craig Kerstiens

    I'm excited to announce support for the Citus extension for Postgres on Crunchy Bridge. This means you can have a fully managed Citus experience on any cloud (AWS, Azure, or GCP) managed by the Postgres experts at Crunchy Data. If you're unfamiliar with Citus

    Read More
  • The Postgres Playground: BYOS (Bring Your Own SQL)

    Craig Kerstiens

    The Postgres playground started with a fun idea of "I wonder if I can put Postgres in a web browser". It evolved to a full set of guided tutorials that you can follow along step by step with. We actually use Notion to power all of our tutorials and an in-house API. This means a new tutorial is as simple as some SQL and some markdown. But, did you know you can bring your own setup to the playground?

    Just Postgres in a browser

    Read More
  • Postgres + Citus + Partman, Your IoT Database

    Craig Kerstiens

    Postgres is a robust data platform. Yes, it's more than a boring old relational database. It has rich indexing, data types (including JSON), and so much more. It also has support for a variety of extensions that can further broaden it's already great functionality. Two of those extensions when coupled together make Postgres a very compelling approach for IoT architectures. Today we're going to start from the ground up on how you would design your architecture with Postgres along with the Citus

    Read More
  • Designing Your Postgres Database for Multi-tenancy

    Craig Kerstiens

    If you're building a B2B app chances are it's multi-tenant, meaning one customer data is separated and doesn't intermingle with other customer data. When building the app itself you'll typically have some URL route defining the specific tenant. When it comes to your database there are a number of design patterns that you can use that offer different advantages, trade-offs, and scaling opportunities.

    When you begin building your app, time to market is essential, but you don't want to make decisions that are hard to reverse. We're first going to take a look at the most common design patterns for multi-tenant database design in Postgres, followed by some guidance on how to design your data model so that you're prepared from day 1 for massive scale (should you need it).

    Three approaches to multi-tenant database design

    Read More