Urgent.News

What's breaking now, across hundreds of outlets.

Tech

How I Got Postgres into a Single Binary

MiniPG is a project that aims to bring the simplicity of SQLite to the Postgres world. It is a single executable that embeds a full Postgres server and client, allowing users to interact with it in the same way they would with sqlite3. Unlike Postgres, which is a client-server database, miniPG provides a standalone binary that can be launched directly from the command line.

To use miniPG, users simply point it at a directory, and that directory becomes the database. Queries can be run against this database without any additional setup or configuration.

The main difference between miniPG and a traditional Postgres setup is that miniPG does not require a separate server process to be running in the background. This means that there is no server to start, no configuration to be done, and no daemon to keep track of. When the program using miniPG terminates, the database is just files on disk, ready to be used again next time.

This approach makes it much easier to try out Postgres for software that previously relied on SQLite, without the need for additional dependencies like Docker or a virtual machine.

The idea behind miniPG originated from several attempts to embed real Postgres into a standalone, cross-platform binary. The initial approach was based on PGlite, a Postgres compiled to WebAssembly. However, PGlite only supports a single connection and session, which limits its usability for more complex applications. To overcome this limitation, the project moved to a different approach using Hyper9, a system API translation framework combined with hypervisor use.

This allowed miniPG to provide a fully functional Postgres server with the performance and usability of a single executable.

Rewritten by urgent.news; may contain errors — check the original.

Read the original at progrium.xyz →

Report a problem with this story

More in Tech

browser_run_code_unsafe: Honest Architecture

Originally published on anton.qa . TL;DR Playwright MCP v0.0.72 renamed browser_run_code to browser_run_code_unsafe, making sandbox escape risk explicit.

  • Browserruncode tool renamed to browserruncodeunsafe
  • New browsernetworkrequest tool added with indexed inspection
  • Update tool references to avoid breaking changes

More from Saturday 21 November →