Skip to content

Releases: postgrespro/testgres

1.13.5

12 Feb 22:23
bde0198

Choose a tag to compare

What's Changed

  • pytest-env is used, pytest.ini is deleted (#338)
  • [#329] get_pg_node_state looks for postmaster to avoid "PID file is empty" (#339)
  • test_logging is fixed (#340)
  • Mistakes in typing are fixed (#341)

Full Changelog: 1.13.4...1.13.5

1.13.4

30 Jan 16:11
d2c2f10

Choose a tag to compare

What's Changed

  • [CI] AstraLinux 1.7 is tested (#334)
  • table_checksum uses "SELECT SUM(hashtext(t::text)) ..." (#337)

Full Changelog: 1.13.3...1.13.4

1.13.3

27 Jan 15:33
27df510

Choose a tag to compare

This is a release to fix a problem with Astra Linux 1.7. It has an old python version 3.7.3.

What's Changed

  • Min python is 3.7.3 (#332)

Full Changelog: 1.13.2...1.13.3

1.13.2

25 Jan 14:40
8be60d4

Choose a tag to compare

Main

This release updates version of testgres.os_ops to 2.0.1 to fix a problem with exec_env in RemoteOperation::exec_command.

What's Changed

  • testgres.os_ops 2.0.1 is used (#324, #331)
  • PostgresNodeLogReader::_collect_logs is corrected (typing) (#325)
  • PostgresNode::start and start2 are updated (#326)
  • CI: GitHub Action is used (#320)
  • CI: Execution of all the tests on altlinux 10/11 (#322)

Full Changelog: 1.13.1...1.13.2

1.13.1 [hot fix]

20 Jan 17:39

Choose a tag to compare

This is a hot fix release.

Changes

  • PostgresNode::start does not pass parameters into start2 (b4b5146)

Full Changelog: 1.13.0...1.13.1

1.13.0

20 Jan 12:01
1282a18

Choose a tag to compare

Main

This release contains important changes that may be incompatible with your existing code.

Please read this release notes and test v1.13.0 before using it in your production environment.

  • PostgresNode::is_started is RO-property now and is not used to ignore secondary attempts to start/stop node.
  • PostgresNode::start (and slow_start) does not allow second attempt to run node and will fail
  • PostgresNode::stop does not allow second attempt to stop node and will fail
  • PostgresNode::kill fails when node is not running
  • PostgresNode::child_processes fails when node is not running
  • PostgresNode::slow_start will try to stop node if node is strted but an "ready" state is not reached
  • Exception classes now have an explicit construtor and RO-properties
  • CatchUpException inherits TestgresException but not QueryException
  • TimeoutException was renamed with QueryTimeoutException. TimeoutException now is an alias of QueryTimeoutException.

What's Changed

  • New utility get_pg_node_state is added (#301)
  • ProcessProxy is updated (RO, typing, asserts) (#304)
  • PostgresNode::child_processes works on a running node only (#303)
  • [typing] PostgresNode: pid, auxiliary_pids, auxiliary_processes (#306)
  • pyproject.toml is used (#307, #309)
  • [CI] Verification on python 3.14 is added (#308)
  • PostgresNode::is_started is read-only and is not used internally (#305)
  • Exception classes are updated (sync with testgres.common 1.0.0) (#310, #312)
  • PostgresNode::slow_start and tests are updated (#313)
  • PostgresNode::start2 is added (#314)
  • CI: Usage of pg8000 in tests is added (#316)
  • PostgresNode::table_checksum is corrected (#317)
  • Custom options paramater was added to pg_dump (#302)

Full Changelog: 1.12.2...1.13.0

1.12.2

30 Dec 15:09
a4055fc

Choose a tag to compare

What's Changed

  • testgres.os_ops 1.0.0 is used (#298)
  • PostgresNode uses kill and path_exists from OsOperations (#299)

Full Changelog: 1.12.1...1.12.2

1.12.1

20 Dec 13:46

Choose a tag to compare

Overview

This update improves an usage of os_ops.kill function. This is required for future changes.

What's Changed

  • cleanup: node._try_shutdown should not pass expect_error to os_ops.kill (#297)

Full Changelog: 1.12.0...1.12.1

1.12.0

14 Nov 11:26
c543963

Choose a tag to compare

Overview

Testgres 1.12.0 introduces a modular architecture, splitting the codebase into three specialized packages while maintaining full backward compatibility.

Breaking Changes

This release is fully backward compatible. Installing testgres will automatically install all required components.

To avoid any problem with upgrade of exists installation of testgres, it is recommended to specify the option "--force-reinstall" options during setup of new version.

New Architecture

Package Structure

Testgres has been reorganized into three packages:

  1. testgres - Main package with full PostgreSQL testing functionality

  2. testgres.os_ops - Operating system operations (NEW)

  3. testgres.common - Base structures and exception classes (NEW)

Migration Guide

No action required. Update testgres as usual:

pip install --upgrade testgres

All satellite packages will be installed automatically, and your existing code will work without modifications.

For new users needing only OS operations:

pip install testgres.os-ops

Bug Fixes

Improvements

Documentation

  • Refreshed README and RST documentation

CI/CD Enhancements

  • Added Python 3.12 and 3.13 support

  • Added PostgreSQL 18 support

Testing

This release has been thoroughly tested in production environments and works as expected with the new modular structure.

New Contributors

Welcome to our new contributors! 🎉

Future Plans

  • testgres.postgres-configuration integration
    • Planning to integrate the testgres.postgres-configuration package into testgres core
    • This will provide enhanced PostgreSQL configuration management capabilities

Notes

  • Satellite package names (testgres.os_ops, testgres.common) may be revised in future releases based on community feedback
  • If you encounter any issues with the new structure or have suggestions for improvement, please open an issue

Full Changelog

For a complete list of changes, see: 1.11.1...1.12.0


Version: 1.12.0
Supported Python Versions: 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
Supported PostgreSQL Versions: 10 - 18

1.11.1

28 Aug 07:42

Choose a tag to compare

What's Changed

Full Changelog: 1.11.0...1.11.1

Changes in testgres code

  • [#240] Using of node.psql with other host and port in #242
  • [#249] Fix of port number leak in NodeBackup::spawn_replica in #250
  • [Refactoring] Default port manager functions now use PortManager__Generic and LocalOperations in #251
  • [#244] PostgresNode now uses os_ops only in #245
  • LocalOperations::get_single_instance is added in #252
  • New OsOperations methods: makedir, rmdir in #253
  • OsOperations::get_tempdir() is added in #254
  • [#256] Port number 65535 is valid for using in #268
  • [#264] New property PostgresNode::port_manager in #269
  • PortManager__Generic sends debug messages "port is reserved/released" in #270
  • [#266] OsOperations::build_path is added in #273
  • A support of cwd parameter is added to OsOperations::exec_command in #272
  • [#274] Unused should_rm_dirs is deleted (cleanup) in #275
  • [python v3.13] TestTestgresCommon::test_logging uses logging._lock in #276
  • NodeApp is refactored in #278
  • Testgres is tested on python 3.7 now, too in #280
  • Remove usage of not standard function nc in remote_ops.py is_port_free in #284

Changes in testgres tests

  • [FIX] Tests include testgres by right way through import in #241
  • Testgres tests create log dir in exact place in #243
  • [test] TestTestgresLocal.test_upgrade_node is corrected in #246
  • Releasing of reserved port in tests in #248
  • [#235] test_pg_ctl_wait_option detects a port conflict in #257
  • Incomplete asserts in are fixed (conftest) in #261
  • [tests] Creation of "dummy/empty" log file for xdist controller is fixed in #282
  • conftest is updated - ExitStatusNames in #283

Our plans

Split testgres' code

We will move the content of testgres/operations folder into the separated package - testgres.os_ops.

Some exceptions will be moved in separated packages testgres.common, too.

It allows to use these things separately.

This change requires to the internal reorganization of testgres source code - 'testgres' folder will be renamed with 'src'.

Remove testgres.plugins

We will remove testgres.plugins folder with all its content (plugin for pg_probackup2).

Plugin for pg_probackup2 was already moved to the separated package - https://github.com/postgrespro/testgres-pg_probackup2

If you download testgres-pg-probackup2 from github directly, please update your code to avoid any problem in the near future.

Contributors