• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Plugin] omp-postgresql v0.1.0-rc.4 — Asynchronous PostgreSQL Component
#1
omp-postgresql
Asynchronous PostgreSQL Component for open.mp

Version: v0.1.0-rc.4



Introduction

omp-postgresql is an open-source PostgreSQL component designed specifically for open.mp, written in C++20 using libpq and the native open.mp Component SDK.

The project provides a modern, asynchronous and parameterized Pawn API with an emphasis on reliability, concurrency, predictable execution and safe resource management.

Features
  • Native open.mp component.
  • Asynchronous database operations.
  • Configurable connection pools and dedicated session workers.
  • FIFO execution lanes.
  • Prepared statements and typed parameters.
  • Bulk operations through arrays, UNNEST and batch execution.
  • Transactions, isolation levels and savepoints.
  • SQL files with named sections.
  • Custom Pawn callbacks with additional arguments.
  • Bounded result streaming with backpressure.
  • Query cancellation and configurable timeouts.
  • Automatic connection recovery.
  • Configurable console and file logging.
  • Automatic resource cleanup based on Pawn script lifetimes.
  • PostgreSQL service profiles and TLS support.
  • Explicit job outcomes and detailed error diagnostics.

The public Pawn API currently provides 69 natives and 3 callbacks.

Database operations are executed on dedicated worker threads, while Pawn callbacks are dispatched on the server's main thread.

What's new in RC.4?
  • Corrected non-blocking connection initialization.
  • Improved connection recovery and address fallback.
  • Fixed a Winsock connection issue reproduced under controlled conditions.
  • Improved Windows runtime dependency packaging.
  • Strengthened transaction interruption and recovery tests.
  • Improved transaction finalization and resource handling.
  • Successful external connection testing against Neon PostgreSQL using the corrected development artifact.

The public Pawn API remains unchanged from previous Release Candidates.

Supported platforms
  • Windows x86
  • Linux x86

Both platforms are tested using official open.mp server distributions.

Testing and validation

The project includes automated testing infrastructure covering:
  • Unit and integration tests.
  • Real open.mp server integration.
  • Concurrent database workloads.
  • Network failures and connection recovery.
  • Transaction interruption and uncertain outcomes.
  • Pawn VM lifecycle and resource management.
  • AddressSanitizer (ASan).
  • UndefinedBehaviorSanitizer (UBSan).
  • ThreadSanitizer (TSan).
  • Semantic fuzz testing.
  • Distribution integrity and dependency verification.

The repository also provides 13 Pawn examples, installation guides, API documentation and detailed validation records.

Installation

  1. Download the appropriate distribution package.
  2. Extract the component and its required runtime files according to the installation guide.
  3. Install omp_postgresql.inc in your Pawn compiler's include directory.
  4. Configure your PostgreSQL service profile.
  5. Recompile your gamemode and start the server.

For detailed instructions, see the installation guide.

Development status

Release Candidate — v0.1.0-rc.4

This release is intended for testing and evaluation. Although the component has undergone extensive automated testing, the sustained 24-hour stability campaign remains pending before the stable v0.1.0 release.

Downloads and documentation



Feedback, suggestions, bug reports and contributions are welcome.
  Reply