Skip to content

Commit 348e057

Browse files
committed
v4.6.0 Better custom time interval support. PG14. See CHANGELOG for more details.
1 parent f4cc254 commit 348e057

38 files changed

+5545
-142
lines changed

CHANGELOG.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
4.6.0
2+
NEW FEATURES
3+
============
4+
-- Support for PostgreSQL 14 added.
5+
6+
-- Added p_drop_cascade option to undo_partition()/undo_partition_proc() to allow undoing sub-partition sets from parent tables higher in the inheritance tree. Only applies when p_keep_tables is set to false. Note this causes all child tables below a sub-partition parent to be dropped when that parent is dropped.
7+
8+
-- Better support NOTIFY commands with the extension's built-in background worker. Thank you to @eisaev on Github for this fix. (GitHub Issue #384).
9+
10+
-- Deprecate pg_partman's specialized UPSERT support for native partitioning in PG11+. Raise error for users to use built-in INSERT ON CONFLICT feature instead.
11+
12+
-- Added new optional parameter to drop_partition_time() to tell partman to use a different reference timestamp from which to determine which partitions should be affected. Thanks to @wesselvdv on Github for this feature (Github PR#386).
13+
14+
BUG FIXES
15+
=========
16+
-- Better handle custom intervals that don't fall on typical datetime boundaries (monthly, daily, etc). Previously if you chose a custom interval that did not initially align on a typical boundary, pg_partman would always try and truncate the initial table's datetime start value to one of those typical boundaries. This could lead to child table constraints that were not expected. A new parameter to create_parent(), 'p_date_trunc_interval' has been added to allow you to tell pg_partman how to truncate the initial datetime value to better meet custom interval needs. This accepts any valid interval value that the built-in 'date_trunc()' function would accept. (Ex: 9 week interval starting on 2021-04-05 would need to be truncated by 'week' vs 'month'. Otherwise pg_partman would truncate by 'month' and the partitions would start on 2021-04-01 and result in unexpected child table boundaries).
17+
18+
-- When dropping tables for retention, DROP...CASCADE is no longer the default. This avoids foreign key references TO the partition set getting dropped if any child table is dropped. Set the option "drop_cascade_fk" in part_config to allow the old behavior if desired. This cascade is only allowed with non-native, trigger-based partitioning and is not supported with sub-partitioning at this time.
19+
20+
-- Fixed show_partition_info() to properly return boundary values no matter what custom interval may be used for the partition set. Update documentation to note that the show_partition_info() boundary results are INCLUSIVE for returned start values and EXCLUSIVE for returned end values.
21+
22+
-- Fixed edge case in sub-partitioning where an additional subpartition child table could be created that is just outside the max boundary limit of its parent table boundaries.
23+
24+
-- Better handling of large interval values in ID partitioning (bigint). Thanks to @calebj on Github for reporting the issue and providing a fix (Github Issue #388).
25+
26+
127
4.5.1
228
NEW FEATURES
329
============

META.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pg_partman",
33
"abstract": "Extension to manage partitioned tables by time or ID",
4-
"version": "4.5.1",
4+
"version": "4.6.0",
55
"maintainer": [
66
"Keith Fiske <[email protected]>"
77
],
@@ -14,15 +14,15 @@
1414
"PostgreSQL": "9.6.0"
1515
},
1616
"recommends": {
17-
"pg_jobmon": "1.3.2"
17+
"pg_jobmon": "1.4.1"
1818
}
1919
}
2020
},
2121
"provides": {
2222
"pg_partman": {
23-
"file": "sql/pg_partman--4.5.1.sql",
23+
"file": "sql/pg_partman--4.6.0.sql",
2424
"docfile": "doc/pg_partman.md",
25-
"version": "4.5.1",
25+
"version": "4.6.0",
2626
"abstract": "Extension to manage partitioned tables by time or ID"
2727
}
2828
},

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Optional retention policy can automatically drop partitions no longer needed for
1111

1212
A background worker (BGW) process is included to automatically run partition maintenance without the need of an external scheduler (cron, etc) in most cases.
1313

14-
All bug reports, feature requests and general questions can be directed to the Issues section on Github. Please feel free to post here no matter how minor you may feel your issue or question may be. - https://github.com/pgpartman/pg_partman/issues
14+
Bug reports & feature requests can be directed to the Issues section on Github - https://github.com/pgpartman/pg_partman/issues
15+
16+
For questions, comments, or if you're just not sure where to post, please use the Discussions section on Github. Feel free to post here no matter how minor you may feel your issue or question may be - https://github.com/pgpartman/pg_partman/discussions
1517

1618
If you're looking for a partitioning system that handles any range type beyond just time & serial, the new native partitioning features in PostgreSQL 10+ are likely the best method for the foreseeable future. If this is something critical to your environment, start planning your upgrades now!
1719

@@ -60,6 +62,7 @@ As of version 4.1.0, pg_partman no longer requires a superuser to run for native
6062
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA partman TO partman;
6163
GRANT EXECUTE ON ALL PROCEDURES IN SCHEMA partman TO partman; -- PG11+ only
6264
GRANT ALL ON SCHEMA my_partition_schema TO partman;
65+
GRANT TEMPORARY ON DATABASE mydb to partman; -- allow creation of temp tables to move data out of default
6366

6467
If you need the role to also be able to create schemas, you will need to grant create on the database as well. In general this shouldn't be required as long as you give the above role CREATE privileges on any pre-existing schemas that will contain partition sets.
6568

0 commit comments

Comments
 (0)