Skip to content

PostgreSQL Mage

Ruohang Feng @Vonng / Pigsty

PostgreSQL ecosystem news, plus development, operations, internals and tuning.

PostgreSQL Mage
Happy 30th Birthday, PostgreSQLPostgreSQLPG EcosystemOpen Source
Instantly Clone PostgreSQL Databases—No Black Magic RequiredPostgreSQLPigstyTools
What Is a PostgreSQL Distribution?PostgreSQLPigsty
Extensions for EveryonePostgreSQLPG EcosystemExtension
PGConf.Dev 2026 Opens Today in VancouverPostgreSQLPG Ecosystem
The pgBackRest Rescue and Open Source's Forced Price DiscoveryPostgreSQLPG EcosystemOpen Source
pgBackRest is No Longer MaintainedPostgreSQLPG EcosystemOpen Source
504 Extensions: Expand the PostgreSQL LandscapePostgreSQLPG EcosystemExtension
PostgreSQL vs. MySQL in 2026PostgreSQLMySQLPG Ecosystem
Is Oracle-Compatible Postgres Actually Useful?PostgreSQLOracleDomestic Database
Urgent Advisory: Pause PostgreSQL Minor-Release Installs and UpgradesPostgreSQLPG Admin
From AGPL to Apache: Why I Changed Pigsty's LicensePigstyOpen Source
How to Actually Do PostgreSQL High AvailabilityPostgreSQLPG Admin
Git for Data: Instant PostgreSQL Database CloningPostgreSQLPG DevelopmentGIS
Why PostgreSQL Will Dominate the AI EraPostgreSQLAIDatabase
Forging a China-Rooted, Global PostgreSQL DistroPostgreSQLPigsty
PG Extension Cloud: Unlocking PostgreSQL’s Entire EcosystemPostgreSQLExtension
The PostgreSQL 'Supply Cut' and Trust Issues in Software Supply ChainPostgreSQLPG Admin
Column: Postgres MagePostgreSQL
PostgreSQL Dominates Database World, but Who Will Devour PG?PostgreSQLPG Ecosystem
PostgreSQL Has Dominated the Database WorldPostgreSQLPG Ecosystem
PGDG Cuts Off Mirror Sync ChannelPostgreSQLPG Admin
Postgres Extension Day - See You There!PostgreSQLExtension
OrioleDB is Coming! 4x Performance, Eliminates Pain Points, Storage-Compute SeparationPostgreSQL
OpenHalo: MySQL Wire-Compatible PostgreSQL is Here!PostgreSQLMySQL
PGFS: Using Database as a FilesystemPostgreSQLObject Storage
PostgreSQL Ecosystem Frontier DevelopmentsPostgreSQLPG Ecosystem
Pig, The Postgres Extension WizardPostgreSQLTools
Don't Upgrade! Released and Immediately Pulled - Even PostgreSQL Isn't Immune to Epic FailsPostgreSQL
PostgreSQL 12 End-of-Life, PG 17 Takes the ThronePostgreSQL
The Ideal Way to Deliver PostgreSQL ExtensionsPostgreSQLPG EcosystemExtension
PostgreSQL 17 Released: No More Pretending!PostgreSQL
Can PostgreSQL Replace Microsoft SQL Server?PostgreSQLMySQLPG Ecosystem
Whoever Integrates DuckDB Best Wins the OLAP WorldPostgreSQLPG Ecosystem
StackOverflow 2024 Survey: PostgreSQL Has Gone Completely BerserkPostgreSQLPG Ecosystem
Self-Hosting Dify with PG, PGVector, and PigstyPostgreSQLPigstyContainers
PGCon.Dev 2024, The conf that shutdown PG for a weekPostgreSQLPG Ecosystem
PostgreSQL 17 Beta1 Released!PostgreSQL
Postgres is eating the database worldPostgreSQLPG EcosystemExtension
Technical Minimalism: Just Use PostgreSQL for EverythingPostgreSQLPG EcosystemTranslation
New PostgreSQL Ecosystem Player: ParadeDBPostgreSQLPG EcosystemExtension
PostgreSQL's Impressive ScalabilityPostgreSQLPerformanceTranslation
PostgreSQL Wins 2024 Database of the Year Award! (Fifth Time)PostgreSQLPG Ecosystem
PostgreSQL Convention 2024PostgreSQLPG Development
PostgreSQL Macro Query Optimization with pg_stat_statementsPostgreSQLPG AdminPerformance
FerretDB: PostgreSQL Disguised as MongoDBPostgreSQLMongoDBPG EcosystemExtension
How to Use pg_filedump for Data Recovery?PostgreSQLPG AdminIncident
PostgreSQL, The most successful databasePostgreSQLPG Ecosystem
AI Large Models and Vector Database PGVectorPostgreSQLPG DevelopmentExtensionVector
How Powerful is PostgreSQL Really?PostgreSQLPG EcosystemPerformance
Why PostgreSQL is the Most Successful Database?PostgreSQLPG Ecosystem
Ready-to-Use PostgreSQL Distribution: PigstyPostgreSQLPigstyRDS
Why Does PostgreSQL Have a Bright Future?PostgreSQLPG Ecosystem
Localization and Collation Rules in PostgreSQLPostgreSQLPG Admin
Implementing Advanced Fuzzy SearchPostgreSQLPG Development
PostgreSQL Logical Replication Deep DivePostgreSQLPG Admin
PG Replica Identity ExplainedPostgreSQLPG AdminPG Development
A Methodology for Diagnosing PostgreSQL Slow QueriesPostgreSQLPG AdminPerformance
Incident-Report: Patroni Failure Due to Time TravelPostgreSQLPG AdminIncident
Online Primary Key Column Type ChangePostgreSQLPG Admin
Golden Monitoring Metrics: Errors, Latency, Throughput, SaturationPostgreSQLPG AdminMonitoring
Database Cluster Management Concepts and Entity Naming ConventionsPostgreSQLPG AdminArchitecture
PostgreSQL's KPIPostgreSQLPG AdminMonitoring
Online PostgreSQL Column Type MigrationPostgreSQLPG AdminMigration
Transaction Isolation Level ConsiderationsPostgreSQLPG Development
Frontend-Backend Communication Wire ProtocolPostgreSQLPG DevelopmentPG Kernel
Incident: PostgreSQL Extension Installation Causes Connection FailurePostgreSQLPG AdminExtensionIncident
CDC Change Data Capture MechanismsPostgreSQLPG Development
Locks in PostgreSQLPostgreSQLPG DevelopmentPG Admin
O(n2) Complexity of GIN SearchPostgreSQLPG Development
PostgreSQL Common Replication Topology PlansPostgreSQLPG AdminArchitecture
Warm Standby: Using pg_receivewalPostgreSQLPG AdminBackup
Incident-Report: Connection-Pool Contamination Caused by pg_dumpPostgreSQLPG AdminIncident
PostgreSQL Data Page Corruption RepairPostgreSQLPG AdminIncident
Relation Bloat Monitoring and ManagementPostgreSQLPG Admin
TimescaleDB Quick StartPostgreSQLPG AdminExtension
Getting Started with PipelineDBPostgreSQLPG AdminExtension
Incident-Report: PostgreSQL Transaction ID WraparoundPostgreSQLPG AdminIncident
Incident-Report: Integer Overflow from Rapid Sequence Number ConsumptionPostgreSQLPG AdminIncident
PostgreSQL Trigger Usage ConsiderationsPostgreSQLPG Development
GeoIP Geographic Reverse Lookup OptimizationPostgreSQLPG DevelopmentExtensionGIS
PostgreSQL Development Convention (2018 Edition)PostgreSQLPG DevelopmentSoftware Engineering
What Are PostgreSQL's Advantages?PostgreSQLPG Ecosystem
KNN Ultimate Optimization: From RDS to PostGISPostgreSQLPG DevelopmentMachine LearningGIS
Efficient Administrative Region Lookup with PostGISPostgreSQLPG DevelopmentGIS
Monitoring Table Size in PostgreSQLPostgreSQLPG AdminMonitoring
PgAdmin Installation and ConfigurationPostgreSQLPG AdminTools
Incident-Report: Uneven Load AvalanchePostgreSQLPG AdminIncident
Implementing Mutual Exclusion Constraints with ExcludePostgreSQLPG Development
Function Volatility Classification LevelsPostgreSQLPG Development
Distinct On: Remove Duplicate DataPostgreSQLPG Development
PostgreSQL Routine MaintenancePostgreSQLPG Admin
Backup and Recovery Methods OverviewPostgreSQLPG AdminBackup
Pgbouncer Quick StartPostgreSQLPG Admin
PgBackRest2 DocumentationPostgreSQLPG AdminBackup
Changing Engines Mid-Flight — PostgreSQL Zero-Downtime Data MigrationPostgreSQLPG AdminMigration
Using sysbench to Test PostgreSQL PerformancePostgreSQLPG AdminPerformance
Testing Disk Performance with FIOPostgreSQLPG AdminPerformance
PostgreSQL Server Log Regular ConfigurationPostgreSQLPG AdminMonitoring
Finding Unused IndexesPostgreSQLPG Admin
Batch Configure SSH Passwordless LoginPostgreSQLPG Admin
Wireshark Packet Capture Protocol AnalysisPostgreSQLPG AdminTools
The Versatile file_fdw — Reading System Information from Your DatabasePostgreSQLPG AdminExtension
Installing PostGIS from SourcePostgreSQLPG AdminExtension
Common Linux Statistics CLI ToolsPostgreSQLPG AdminTools
Go Database Tutorial: database/sqlPostgreSQLSoftware Engineering
Implementing Cache Synchronization with Go and PostgreSQLPostgreSQLPG Development
Auditing Data Changes with TriggersPostgreSQLPG Development
Building an ItemCF Recommender in Pure SQLPostgreSQLPG DevelopmentMachine Learning
UUID Properties, Principles and ApplicationsPostgreSQLPG DevelopmentArchitecture
PostgreSQL MongoFDW Installation and DeploymentPostgreSQLPG AdminExtension
  • Using sysbench to Test PostgreSQL Performance

    By Ruohang Feng In PGSQL 298 words 2 min

    Ruohang FengPostgreSQLPG AdminPerformance

    Featured Image for Using sysbench to Test PostgreSQL Performance

    sysbench homepage: https://github.com/akopytov/sysbench Installation Binary installation - on Mac, use brew to install sysbench: brew install sysbench --with-postgresql Source compilation (CentOS): yum -y install make automake libtool pkgconfig …

    sysbench homepage: https://github.com/akopytov/sysbench Installation Binary installation - on Mac, use brew to install sysbench: brew install sysbench --with-postgresql Source compilation (CentOS): yum -y install make automake libtool pkgconfig …

  • Testing Disk Performance with FIO

    By Ruohang Feng In PGSQL 335 words 2 min

    Ruohang FengPostgreSQLPG AdminPerformance

    Featured Image for Testing Disk Performance with FIO

    Author: Vonng FIO is an excellent disk performance testing tool. You can test disk read/write performance using the following commands. fio --filename=/tmp/fio.data \ -direct=1 \ -iodepth=32 \ -rw=randrw \ --rwmixread=80 \ -bs=4k \ -size=1G \ …

    Author: Vonng FIO is an excellent disk performance testing tool. You can test disk read/write performance using the following commands. fio --filename=/tmp/fio.data \ -direct=1 \ -iodepth=32 \ -rw=randrw \ --rwmixread=80 \ -bs=4k \ -size=1G \ …

  • PostgreSQL Server Log Regular Configuration

    By Ruohang Feng In PGSQL 654 words 4 min

    Ruohang FengPostgreSQLPG AdminMonitoring

    Featured Image for PostgreSQL Server Log Regular Configuration

    It’s recommended to configure PostgreSQL’s log format as CSV for easy analysis, and it can be directly imported into PostgreSQL data tables. Log-Related Configuration Items log_destination ='csvlog' logging_collector =on log_directory ='log' …

    It’s recommended to configure PostgreSQL’s log format as CSV for easy analysis, and it can be directly imported into PostgreSQL data tables. Log-Related Configuration Items log_destination ='csvlog' logging_collector =on log_directory ='log' …

  • Finding Unused Indexes

    By Ruohang Feng In PGSQL 373 words 2 min

    Ruohang FengPostgreSQLPG Admin

    Featured Image for Finding Unused Indexes

    Author: Vonng Indexes are useful, but they’re not free. Unused indexes are a waste. Use the following SQL to identify unused indexes: First, exclude indexes used to implement constraints (can’t be dropped) Expression indexes (containing field 0 in …

    Author: Vonng Indexes are useful, but they’re not free. Unused indexes are a waste. Use the following SQL to identify unused indexes: First, exclude indexes used to implement constraints (can’t be dropped) Expression indexes (containing field 0 in …

  • Batch Configure SSH Passwordless Login

    By Ruohang Feng In PGSQL 292 words 2 min

    Ruohang FengPostgreSQLPG Admin

    Featured Image for Batch Configure SSH Passwordless Login

    Configuring SSH is fundamental operations work - sometimes the basics need revisiting. Generate Public-Private Key Pairs Ideally, everything should use public-private key authentication for passwordless direct connection from local to all database …

    Configuring SSH is fundamental operations work - sometimes the basics need revisiting. Generate Public-Private Key Pairs Ideally, everything should use public-private key authentication for passwordless direct connection from local to all database …

  • Wireshark Packet Capture Protocol Analysis

    By Ruohang Feng In PGSQL 979 words 5 min

    Ruohang FengPostgreSQLPG AdminTools

    Featured Image for Wireshark Packet Capture Protocol Analysis

    Wireshark is a very useful tool, especially suitable for analyzing network protocols. Here’s a simple introduction to using Wireshark for packet capture and PostgreSQL protocol analysis. Assuming debugging local PostgreSQL instance: 127.0.0.1:5432 …

    Wireshark is a very useful tool, especially suitable for analyzing network protocols. Here’s a simple introduction to using Wireshark for packet capture and PostgreSQL protocol analysis. Assuming debugging local PostgreSQL instance: 127.0.0.1:5432 …

  • The Versatile file_fdw — Reading System Information from Your Database

    By Ruohang Feng In PGSQL 842 words 4 min

    Ruohang FengPostgreSQLPG AdminExtension

    Featured Image for The Versatile file_fdw — Reading System Information from Your Database

    Author: Vonng PostgreSQL is the most advanced open-source database, and one of its killer features is FDW: Foreign Data Wrapper. Through FDW, users can access various external data sources from Postgres in a unified manner. file_fdw is one of the …

    Author: Vonng PostgreSQL is the most advanced open-source database, and one of its killer features is FDW: Foreign Data Wrapper. Through FDW, users can access various external data sources from Postgres in a unified manner. file_fdw is one of the …

  • Installing PostGIS from Source

    By Ruohang Feng In PGSQL 608 words 3 min

    Ruohang FengPostgreSQLPG AdminExtension

    Featured Image for Installing PostGIS from Source

    Strongly recommend using yum / apt commands to install PostGIS from official PostgreSQL binary repositories. Reference: …

    Strongly recommend using yum / apt commands to install PostGIS from official PostgreSQL binary repositories. Reference: …

  • Common Linux Statistics CLI Tools

    By Ruohang Feng In PGSQL 2358 words 12 min

    Ruohang FengPostgreSQLPG AdminTools

    Featured Image for Common Linux Statistics CLI Tools

    top free vmstat iostat top Display Linux tasks Summary Press space or enter to force refresh Use h to open help Use l,t,m to collapse summary sections Use d to modify refresh interval Use z to enable color highlighting Use u to list processes for …

    top free vmstat iostat top Display Linux tasks Summary Press space or enter to force refresh Use h to open help Use l,t,m to collapse summary sections Use d to modify refresh interval Use z to enable color highlighting Use u to list processes for …

  • Go Database Tutorial: database/sql

    By Ruohang Feng In PGSQL 4213 words 20 min

    Ruohang FengPostgreSQLSoftware Engineering

    Featured Image for Go Database Tutorial: database/sql

    The conventional way Go uses SQL and SQL-like databases is through the standard library database/sql. This is a generic abstraction for relational databases that provides a standard, lightweight, row-oriented interface. However, the documentation for …

    The conventional way Go uses SQL and SQL-like databases is through the standard library database/sql. This is a generic abstraction for relational databases that provides a standard, lightweight, row-oriented interface. However, the documentation for …

  • Implementing Cache Synchronization with Go and PostgreSQL

    By Ruohang Feng In PGSQL 1226 words 6 min

    Ruohang FengPostgreSQLPG Development

    Featured Image for Implementing Cache Synchronization with Go and PostgreSQL

    Parallel and Hierarchy are the two great principles of architectural design, and caching is the embodiment of Hierarchy in the IO domain. Implementing caching mechanisms in single-threaded scenarios can be surprisingly simple, but it’s hard to …

    Parallel and Hierarchy are the two great principles of architectural design, and caching is the embodiment of Hierarchy in the IO domain. Implementing caching mechanisms in single-threaded scenarios can be surprisingly simple, but it’s hard to …

  • Auditing Data Changes with Triggers

    By Ruohang Feng In PGSQL 477 words 3 min

    Ruohang FengPostgreSQLPG Development

    Featured Image for Auditing Data Changes with Triggers

    Author: Vonng (@Vonng) Sometimes we want to record important metadata changes for audit purposes. PostgreSQL triggers can conveniently solve this need automatically. -- Create an audit-specific schema and revoke all non-superuser privileges DROP …

    Author: Vonng (@Vonng) Sometimes we want to record important metadata changes for audit purposes. PostgreSQL triggers can conveniently solve this need automatically. -- Create an audit-specific schema and revoke all non-superuser privileges DROP …

  • Building an ItemCF Recommender in Pure SQL

    By Ruohang Feng In PGSQL 408 words 2 min

    Ruohang FengPostgreSQLPG DevelopmentMachine Learning

    Featured Image for Building an ItemCF Recommender in Pure SQL

    Everyone knows “item-based collaborative filtering” (ItemCF): Amazon recommendations, YouTube watch-next, etc. Here’s how to implement it in PostgreSQL using the MovieLens dataset. No Python, just SQL. Theory in one minute ItemCF recommends items …

    Everyone knows “item-based collaborative filtering” (ItemCF): Amazon recommendations, YouTube watch-next, etc. Here’s how to implement it in PostgreSQL using the MovieLens dataset. No Python, just SQL. Theory in one minute ItemCF recommends items …

  • UUID Properties, Principles and Applications

    By Ruohang Feng In PGSQL 1678 words 8 min

    Ruohang FengPostgreSQLPG DevelopmentArchitecture

    Featured Image for UUID Properties, Principles and Applications

    A recent project needed to generate business transaction IDs with the following requirements: IDs must be generated in a distributed manner, cannot depend on central node allocation while ensuring global uniqueness. IDs must contain timestamps and …

    A recent project needed to generate business transaction IDs with the following requirements: IDs must be generated in a distributed manner, cannot depend on central node allocation while ensuring global uniqueness. IDs must contain timestamps and …

  • PostgreSQL MongoFDW Installation and Deployment

    By Ruohang Feng In PGSQL 699 words 4 min

    Ruohang FengPostgreSQLPG AdminExtension

    Featured Image for PostgreSQL MongoFDW Installation and Deployment

    Update: Recently MongoFDW has been taken over by Cybertech for maintenance, so maybe it’s not as bad anymore. Recently had business requirements to access MongoDB through PostgreSQL FDW. Initially I thought this was a pretty easy task. But what …

    Update: Recently MongoFDW has been taken over by Cybertech for maintenance, so maybe it’s not as bad anymore. Recently had business requirements to access MongoDB through PostgreSQL FDW. Initially I thought this was a pretty easy task. But what …