Tech News
← Back to articles

Pg-dev-container is a ready-to-run VS Code development container for PostgreSQL

read original related products more articles

Visual Studio Code - Development Container - PostgreSQL

This project provides a Visual Studio Code (VSCode) development container for PostgreSQL. This container contains all the tools needed to debug PostgreSQL and a PostgreSQL build that is compiled without optimizations, enabled assertions, and debug symbols. This PostgreSQL build is slower than a production build but allows it to develop and test PostgreSQL extensions. For instance, the build performs checks to catch programming mistakes due to the enabled assertions ( USE_ASSERT_CHECKING ) and cleaning freed memory early ( CLOBBER_FREED_MEMORY ). The created debug symbols and the missing optimizations make it easy to attach a debugger to this instance.

Prerequisites

To use the development container, the following prerequisites have to be met:

VSCode is installed

Docker is installed

The VSCode Dev Containers extension is installed

Open the Project

After the prerequisites are met, the VSCode project can be opened. After loading the project, VSCode asks if the project should be Reopened in Container ; this option should be selected.

Afterward, VSCode downloads the needed base container image, installs the tools, and compiles PostgreSQL. This step might need some time to complete. Details about the build process are shown by clicking on the show log link.

... continue reading