Releases: pgpartman/pg_partman
Releases · pgpartman/pg_partman
v5.4.1
5.4.1
BUGFIXES
- Ensure all functions have a search path set to avoid security issues around user object overrides. Ensure all procedures have all object calls schema qualified since a default search path cannot be set in them. (Github Issue #836)
- Fix timestamp WITHOUT timezone not working properly with the partition_data_time() function and partition_data_proc() procedure. (Github Issue #838)
v5.4.0
5.4.0
NEW FEATURES
- Created a new functions
create_partition()to replacecreate_parent()andcreate_sub_partition()to replacecreate_sub_parent(). This is to bring more consistent naming to the functions since the opposite of this function isundo_partition().create_parent()andcreate_sub_parent()will still exist for backward compatibility until at least the next major release. (Github Issue #706) - Added a boolean parameter to
reapply_constraints_proc()to control the ANALYZE run. (Github Issue #814) - Added new function
config_cleanup()to leave the partition table intact, but remove all configuration options in pg_partman (config table entries and template table). This allows future maintenance to be handled outside of pg_partman or not be managed at all. - Allow ignoring infinity values in the default table. Note leaving a large number of rows in the default table can greatly affect partition maintenance performance. See the
p_ignore_infinityparameter for partition_data_time(), partition_data_proc(), and check_default(). (Github Issue #519) - If inheriting privileges from the parent table, properly inherit all possible table privileges that could be set including the new MAINTAIN privilege introduced in PG17. Should also account for any future table-level privileges added. Thank you to fgit-hubber on Github for the fix. (Github Issue #831)
BUGFIXES
- Stopped analyze from running when calling the
reapply_constraints_proc()in dryrun mode. (Github Issue #814) - Have partition_data_proc() take a session level advisory lock instead of a transactional one to better prevent concurrent runs. (Github Issue #819)
- Fix variable assignment operators in partiton_data_time() and partition_data_id() to correct error when choosing DESC order for partitioning action.
v5.3.1
5.3.1
BUGFIXES
- In PostgreSQL 18, handle the case where the shared library used by the background worker may be a greater version than the installed version of pg_partman (Ex. new package installed, but the extension wasn't updated). This will cause an exception to avoid any unpredictable behavior. Note this can still happen with versions lower than 18, but the ability to give the shared library a trackable version was not added until 18.
- For all versions of PostgreSQL, throw a warning if the version of the extension that has been installed to the host system (default version) is different than the version that is installed in the database. Note this can cause the same issue as the above mismatched shared library, but it also accounts for other scenarios that are not as serious to warrant an error exception. (Github PR #799)
5.3.0
5.3.0
NEW FEATURES
- Added new function partition_data_async() to allow smaller batching of data per transaction when moving data out of the default partition. (Github Issue #353)
- Note this function currently only works with time-based partitioning. ID/integer partitioning is in development.
- WARNING: While data is in transition between the default and the destination child table using this procedure, it is NOT visible to users of the partition table. See documentation for this function for additional details.
- Better support filtering out any columns with
p_ignored_columnswhile partitioning data using thepartition_data_time(),partition_data_id(), orpartition_data_proc()utilities. (Github PR #723)- Allows for filtering out GENERATED columns while moving data so that newly generated values will be entered for moved rows.
- Non-GENERATED columns that are filtered out will either have NULL values or use the default value when rows are moved.
- Added support for uuid-based partition sets to partition_data_time()/partition_data_proc() functions (Github Issue #789)
- Allow a starting offset to id/integer based partitioning. Added a new parameter to create_parent: p_offset_id. Note that the offset will carry through to all subsequent child tables. Ex: offset of 5 with interval 10 will make lower boundaries 5, 15, 25, etc. (Github Issue #339)
- Reduce the logging of the dynamic background working runs to be DEBUG1. Changed existing DEBUG1 logging messages in the BGW to DEBUG2.
- Unlogged tables are still supported in pg_partman as of PostgreSQL 18 and newer, but the parent table can no longer be flagged unlogged. This only works through the template table system in pg_partman. (Github Issue #774)
BUGFIXES
- Allow
partition_data_*()utilities to properly work when a PK/Unique key is set to GENERATE ALWAYS. (Github PR#723) - Handle if the given default table already exists when calling
create_parent(). Helps to better handle migrating an existing partition set to pg_partman. - When disabling the template table in create_parent(), do not error out trying to inherit things from it. (Github #761)
- Added check to ensure that the default table cannot be manually set as the value of p_source_table in partitioning functions and procedures. This would previously cause an unhandled edge case endless loop since the data moved out of the default was getting moved right back into the default again instead of a new child partition. (Github Issue #353)
- Always ensure transaction is committed at proper time when using reapply_constraints_proc(). (Github PR#780)
- Added plpgsql as a required dependency in the extension control file. (Github PR# 808)
DOCUMENTATION
- Updated documentation for the time decoder function to note that it must take a TEXT value as its parameter at this time.
5.3.0RC1
v5.2.4
v5.2.3
v5.2.2
5.2.2
BUG FIXES
- Corrected SQL statements and updated functions missing from the 5.1.0 to 5.2.0 update files. If pg_partman was installed initially with 5.2.0, there are no known issues. If errors about missing functions or columns are encountered during maintenance after updating to 5.2.x, please make sure you are on this latest release. Thank you to all the users helping to test this issues!
v5.2.1
5.2.1
BUG FIXES
- Corrected a syntax error in the 5.1.0 to 5.2.0 update file. There are no problems with a direct install of 5.2.0 and there is no technical need to update to 5.2.1. The issue was encountered only when updating from any prior version to 5.2.0. New release was tagged to ease rolling out the fix for package managers.
v5.2.0
5.2.0
NEW FEATURES
- Add support for UUIDv7 and other custom encoded methods for time-based partitioning. Special thanks to akulapid on Github for the addition of this feature. (Github Issue #528)
- Add support for microsecond precisions in epoch partitioning. (Github PR #659)
- Improve partition maintenance performance when determining next partition to be created. (Github Issue #660)
- Removed requirement for pg_partman to be installed as a superuser. See "superuser" parameter in control file documentation for more details - https://www.postgresql.org/docs/current/extend-extensions.html#EXTEND-EXTENSIONS-FILES
- Do not create partitions during a maintenance run that aren't going to be kept as part of retention anyway. (Github Issue #649)
- Removed
default_tablecolumn frompart_configtable. It's only necessary inpart_config_subto determine whether future sub-partition parents should have defaults made. Adjusted other code to look up whether a default table actually exists to determine its behavior. (Github Issue #637) - Allow the control column to be NULL. This is not advised without very careful review and an explicit use-case defined as it can cause unexpected behavior or excessive data in the DEFAULT child partition. A new flag
p_control_not_nullhas been added to thecreate_parent()andcreate_sub_parent()functions. - Include the following additional parent table properties on newly created child tables: COMPRESSION, STORAGE, and STATISTICS. Note this is only for newly created child tables. Existing child tables will have to be updated manually. (Github Issue #683)
BUG FIXES
- Enforcement of the control column being NOT NULL was not being done as intended. This has been fixed. If you'd like to allow the control column to be NULL, see the new feature flag in 5.2.0
- Fixed handling of bigint data type with LIST partitioning. New partitions were not being created during maintenance and
show_*functions were not giving expected results. (Github Issue #704) - Fixed
reapply_constraint_proc()to work properly when there are no relevant child tables to place additional constraints. In the process reworked the logic to determine the target child tables for both that procedure and the apply_constraints() function. The determining factor is now always the newest child table that contains data (other than the default). Updated documentation to clarify how the optimize_constraint flag works. (Github Issue #694) - Properly handle partial indexes that are inherited from the template table. (Github Issue #657)
- Move the retention logic for dropping tables later in the maintenance process to help avoid longer running heavy locks on partition sets. (Github Issue #678)