
Setting up PostgreSQL streaming replication
This tutorial will show you how to setup up and configure streaming replication for PostgreSQL 13 & how to set up database servers quickly.
366 articles on Databases.

This tutorial will show you how to setup up and configure streaming replication for PostgreSQL 13 & how to set up database servers quickly.

TLS is a technology widely used in combination with PostgreSQL to encrypt client / server connections. This blogpost explains how TLS works.

"ERROR: deadlock detected" - message - what should I do? This article explains what this really means and how deadlocks can be prevented.

As designers, we are often burdened by the responsibility of producing and managing website content. It’s not our job to write it, but it’s not the client’s either. In many cases a vacuum emerges which ultimately gets filled with poor content. In this article, Matt Saunders will show you that you can avert disaster by including content production in the design process.

Resiliency is important at Shopify and although we have many tools to help us during incidents, some problems need to be fixed at the database level. At Shopify, we use ProxySQL to manage connections between applications and our MySQL databases

Cloudflare introduces Macrometa and Fauna as Edge database partners and adds database connectors for DynamoDB and Aurora to Cloudflare Workers, expanding what developers can build at the edge.

A new feature has arrived: "pg_read_all_data" - a predefined role that can run an unfettered pg_dump without that role being a superuser.

Basically, there are two ways to delete BLOBs (binary large objects):Change the PostgreSQL configuration or delete the BLOBs in chunks.

Visualizing spatial data is an important task. This tutorial helps you with getting started with visualizing OSM data with PostGIS and QGIS.

PostgreSQL allows you to define users (=roles), groups, etc. This post explains how to retrieve information on roles & role membership.

About a year ago, we migrated an old rate limiter in order to serve more traffic and accommodate a more resilient platform architecture. We adopted a replicated Redis backend with…

This article explains what PostgreSQL tablespaces are, when to use them and how they are different from Oracle tablespaces.

Choosing to use a new technology can often bring much desired productivity, security, and efficiency to a project. It is also fraught with risk and uncertainty. How and when to adopt a new technology for client projects is at the heart of leading a great agency. In this article, Michael Rispoli explains how he evaluated the decision of whether or not to adopt a serverless database for client proje

How to set up SSL authentication for PostgreSQL. Handle secure client-server connections in the best possible way.

This article gives an introduction from Postgres to Docker and whether you should run production Postgres workloads in a docker container.

GitHub Actions are a piece of excellent machinery for PostgreSQL related tasks on your repo with support for Windows, Ubuntu and macOS environments.

This article shows how you can you use PostgreSQL database statistics to get an upper limit for the correct size for a connection pool.

UPDATED 2023: A trigger is a way to automatically respond to events. This is a tutorial on how to manage and program triggers in PostgreSQL.

At Shopify, we’ve long used database replication for redundancy and failure recovery, but only fairly recently started to explore the potential of replicas as an alternative read-only data source for applications.

This is guest post by Sachin Sinha who is passionate about data, analytics and machine learning at scale. Author & founder of BangDB. This article is to simply report the YCSB bench test results in detail for five NoSQL databases namely Redis, MongoDB, Couchbase, Yugabyte and BangDB and compare the result side by side. I have used latest versions for each NoSQL DB and have followed the recommendat

This article explains how to partition an area of interest spatially: Approximation of customer potential using PostGIS. Catchment areas.

At GitHub, our community is at the heart of everything we do. We want to make it easier to build the things you love, with the tools you prefer to…

Learn how PostgreSQL can help with basic calculations regarding golden proportions. Do mathematics in your database development work.

Start learning some new Postgres stuff again in 2021 and find some tips: Partial indexing, estimating average row size and more.

Day 32: A Rails model that doesn't use the database with ActiveHash


A shibboleth is a phase whose pronounciation determines if you belong or not. This article tells you how not to pronounce "PostgreSQL".

In this article, Ankita Masand will show you how to build an event-based application and send a web-push notification when a particular event is triggered. She’ll set up database tables, events, and scheduled triggers on the Hasura GraphQL engine and wire up the GraphQL endpoint to the front-end application to record the stock price preference of the user.

Update/ upgrade: what's the difference? This blog post covers the best ways of upgrading or updating PostgreSQL to the latest release.

From the very beginning of Slack, MySQL was used as the storage engine for all our data. Slack operated MySQL servers in an active-active configuration. This is the story of how we changed our data storage architecture from the active-active clusters over to Vitess — a horizontal scaling system for MySQL. Vitess is the present…

I’ll show you how we moved to a SQL modelling workflow by leveraging dbt (data build tool) and created tooling for testing and documentation on top of it.

Replication conflicts can cause problems with streaming replication. This article tells you what they are and how to deal with them.

One line of code can 5x your Rails application performance. What if you could make a small change to your database design that would unlock massively more efficient data access? At Shopify, we dusted off some old database principles and did exactly that with the primary Rails application.

Foreign keys will introduce some issues which have to be considered when writing applications. If a foreign key is in place the inseration order starts to matter.

What it is: CG/SQL is a code generation system for the popular SQLite library that allows developers to write stored procedures in a variant of Transact-SQL (T-SQL) and compile them into C code that uses SQLite’s C API to do the coded operations. CG/SQL enables engineers to create highly complex stored procedures with very large […]

SQL and PostgreSQL can be used to create sample data which possesses certain statistical properties like a normal distribution.

How can you find data even if there are typos? In PostgreSQL there are various solutions to the problem of a search with odd spelling.

Microsoft Azure is one of the most popular cloud providers in the world, and a natural fit for database hosting on applications leveraging Microsoft across their infrastructure. MySQL is the number one open source database that’s commonly hosted through Azure instances. While Microsoft offers their own Azure Database product, there are other alternatives available that may be able to help you impr

GROUP BY is an integral part of SQL and PostgreSQL. You might not know that the GROUP BY expression can handle more than just simple fields.

Flask makes it possible for developers to build an API for whatever use case they might have. In this tutorial, Wole Oyekanmi will show you how to set up Google Cloud, Cloud SQL, and App Engine to build a Flask API. (Cloud SQL is a fully managed platform-as-a-service (PaaS) database engine, and App Engine is a fully managed PaaS for hosting applications.)

This article gives a simple introduction with examples to recursive queries in PostgreSQL. It also includes a comparison to Oracle recursive queries.

The most significant changes in pgwatch2 v1.8. PGWatch2 is a PostgreSQL monitoring tool - useful dashboard

UPDATED 08.05.2023 How to create useful new data types with CREATE DOMAIN in PostgreSQL | Advanced server side check constraints

Calculating differences between rows | How can one calculate the difference between the current and the previous row? | timeseries data

“If we had this data what would it mean?” - read more about this PostgreSQL technique, what it is good for & how it works.

Connection of DB2 with PostgreSQL done with the extension db2_fwd | Migration of db2's data to PostgreSQL | Read data from DB2

Check out our sixteenth edition of The Serverlist below. Get the latest scoop on the serverless space, get your hands dirty with new developer tutorials, engage in conversations with other serverless developers, and find upcoming meetups and conferences to attend.

Factories are a faster way to create new database records., A fixture is a state of a set or collection of objects that serve as a baseline for running tests, and a serializer is responsible for transforming the response. In this second part of the Mirage JS Deep Dive series, Kelvin Omereshone will be looking at Mirage JS’ Factories, Fixtures, and Serializers. You’ll see how they enable rapid API

How to use partition management to speed up queries in PostgreSQL and make tables more manageable as data amounts grow.

Here are some of the approaches we use to help data workshop participants walk away equipped and excited to start using data to power their work.

Check out what we learned from shipping our busiest Go service in production—we found 3 bugs in the Go MySQL driver.

How to grant users access to a certain piece of data a limited number of times. What happens if two users access it concurrently?

If you’re hosting your databases in the cloud, choosing the right cloud service provider is a significant decision to make for your long-term hosting costs. This is especially apparent in today's world where organizations are doing whatever they can to optimize and reduce their costs. Over the last few weeks, we have been inundated with requests from SMB customers looking to improve the ROI on the

This tutorial would take you on a step by step guide to build a functional survey app using Vue.js and Firebase. From validating the user’s data through Vuelidate, to authentication, storing the user’s data, route protection and sending data to Firebase servers. All the steps used in the tutorial are practical, and can be reproduced in any real-life project, even with a custom backend.

PostgreSQL v13 introduces autovacuum for insert-only tables. This article tells you why and how to make use of this new feature.

The admin panel is one of the most powerful, flexible features that the Django web framework provides, combining instant off-the-shelf functionality with infinite customization. Using an example project based on a library inventory system, we’ll use the admin panel to learn about creating models and interacting with relational databases in Django.

In this article, Chidi Orji will create a set of API endpoints using [Express](https://expressjs.com/) from scratch in ES6 syntax, and cover some development best practices. Find out how all the pieces work together as you create a small project using Continuous Integration and Test-Driven Development before deploying to Heroku.


Reset password functionality is table stakes for any user-friendly application. It can also be a security nightmare. Using NodeJS and MySQL. Today, Darshan Somashekar demonstrates how to successfully create a secure reset password flow so you can avoid these pitfalls. Darshan will be using NodeJS and MySQL as the base components. If you’re writing using a different language, framework, or database

In a MySQL master-slave high availability (HA) setup, it is important to continuously monitor the health of the master and slave servers so you can detect potential issues and take corrective actions. In this blog post, we explain some basic health checks you can do on your MySQL master and slave nodes to ensure your setup is healthy. The monitoring program or script must alert the high availabili