Skip to content

Commit

Permalink
[#23123] YSQL: Disable other partition methods except native in pg_pa…
Browse files Browse the repository at this point in the history
…rtman

Summary:
pg_partman extension provides partition creation and management of partitioned table via native and non-native way.

Native partitioning leverages PostgreSQL's built-in declarative partitioning features. This method is available from PostgreSQL
10 onwards. pg_partman automates the creation and maintenance of these native partitions.

Non-native partitioning refers to the traditional method of partitioning tables before PostgreSQL introduced native
declarative partitioning in version 10.  It uses table inheritance and triggers to route data to the appropriate child tables.

This diffs disables the use of creating and managing partition tables via non-native methods. Reasons for this

 - Non-native partitioning was added as partition management support of PG versions before 10 when native partitioning was not added.

 - Non-native partitioning use table inheritance to create partition table but table inheritance in not supported in YB.
 - Upgraded [[ https://github.com/pgpartman/pg_partman/tree/v5.1.0 | versions ]] of pg_partman which are > v4.7.4 has deprecated non-native partitioning hence migrating partition set using the old non-native method to a partition set using the native features found in PostgreSQL will be a pain point.
Jira: DB-12056

Test Plan: jenkins: compile only

Reviewers: skumar, hsunder, jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D36424
  • Loading branch information
Devansh Saxena committed Jul 15, 2024
1 parent 04cf65d commit ed1809c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ CREATE FUNCTION @extschema@.check_partition_type (p_type text) RETURNS boolean
DECLARE
v_result boolean;
BEGIN
SELECT p_type IN ('partman', 'time-custom', 'native') INTO v_result;
SELECT p_type IN ('native') INTO v_result;
RETURN v_result;
END
$$;
Expand Down

0 comments on commit ed1809c

Please sign in to comment.