Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile-15
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ARG plv8_release=3.1.5
ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492
ARG pg_net_release=0.7.1
ARG rum_release=1.3.13
ARG pg_partman_release=5.2.4
ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6
ARG libsodium_release=1.0.18
ARG pgsodium_release=3.1.6
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-17
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ARG plv8_release=3.1.5
ARG pg_plan_filter_release=5081a7b5cb890876e67d8e7486b6a64c38c9a492
ARG pg_net_release=0.7.1
ARG rum_release=1.3.13
ARG pg_partman_release=5.2.4
ARG pg_hashids_release=cd0e1b31d52b394a0df64079406a14a4f7387cd6
ARG libsodium_release=1.0.18
ARG pgsodium_release=3.1.6
Expand Down
1 change: 1 addition & 0 deletions Dockerfile-orioledb-17
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ARG pgsodium_release=3.1.6
ARG pg_graphql_release=1.5.11
ARG pg_stat_monitor_release=1.1.1
ARG pg_jsonschema_release=0.1.4
ARG pg_partman_release=5.2.4
ARG pg_repack_release=1.4.8
ARG vault_release=0.2.8
ARG groonga_release=12.0.8
Expand Down
2 changes: 1 addition & 1 deletion ansible/files/postgresql_config/postgresql.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ default_text_search_config = 'pg_catalog.english'
#local_preload_libraries = ''
#session_preload_libraries = ''

shared_preload_libraries = 'pg_stat_statements, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle, plan_filter, supabase_vault' # (change requires restart)
shared_preload_libraries = 'pg_stat_statements, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle, plan_filter, supabase_vault, pg_partman_bgw' # (change requires restart)
jit_provider = 'llvmjit' # JIT library to use

# - Other Defaults -
Expand Down
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ postgres_major:

# Full version strings for each major version
postgres_release:
postgresorioledb-17: "17.5.1.029"
postgres17: "17.6.1.008"
postgres15: "15.14.1.008"
postgresorioledb-17: "17.5.1.029-pgpartman-test-1"
postgres17: "17.6.1.008-pgpartman-test-1"
postgres15: "15.14.1.008-pgpartman-test-1"

# Non Postgres Extensions
pgbouncer_release: "1.19.0"
Expand Down
3 changes: 3 additions & 0 deletions migrations/schema-15.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql;

COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support';

CREATE SCHEMA partman;
CREATE EXTENSION IF NOT EXISTS pg_partman WITH SCHEMA partman;


--
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
Expand Down
6 changes: 6 additions & 0 deletions migrations/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ CREATE EXTENSION IF NOT EXISTS pg_graphql WITH SCHEMA graphql;

COMMENT ON EXTENSION pg_graphql IS 'pg_graphql: GraphQL support';

--
-- Name: pg_partman; Type: EXTENSION; Schema: -; Owner: -
--

CREATE SCHEMA partman;
CREATE EXTENSION pg_partman SCHEMA partman;

--
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
Expand Down
4 changes: 4 additions & 0 deletions migrations/tests/extensions/30-pg_partman.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BEGIN;
create schema if not exists "partman";
create extension if not exists pg_partman with schema "partman";
ROLLBACK;
1 change: 1 addition & 0 deletions migrations/tests/extensions/test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
\ir 27-pg_repack.sql
\ir 28-pgvector.sql
\ir 29-pg_tle.sql
\ir 30-pg_partman.sql
2 changes: 1 addition & 1 deletion nix/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
) filteredSqlTests;
sortedTestList = builtins.sort (a: b: a < b) testList;
in
pkgs.runCommand "postgres-${pgpkg.version}-check-harness"
pkgs.runCommand "postgres-${pgpkg.version}-ch"
{
nativeBuildInputs = with pkgs; [
coreutils
Expand Down
2 changes: 1 addition & 1 deletion nix/docs/adding-new-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ A few things about `buildPgrxExtension_x`:
2. You may need to add tests to our test.yml gh action workflow as well.
3. You can add the package and name and version to `ansible/vars.yml` it is not necessary to add the sha256 hash here, as the package is already built and cached in our release process before these vars are ever run.
4. to check that all your files will land in the overall build correctly, you can run `nix profile install .#psql_15/bin` on your machine, and check in `~/.nix-profile/bin, ~/.nix-profile/lib, ~/.nix-profile/share/postgresql/*` and you should see your lib, .control and sql files there.
5. You can also run `nix run .#start-server 15` and in a new terminal window run `nix run .#star-client-and-migrate 15` and try to `CREATE EXTENSION <yourname>` and work with it there
5. You can also run `nix run .#start-server 15` and in a new terminal window run `nix run .#start-client -- --version15` and try to `CREATE EXTENSION <yourname>` and work with it there
6. Check that your extension works with the `pg_upgrade` process (TODO documentation forthcoming)
7. Now you are ready to PR the extension
8. From here, the release process should typically take care of the rest.
6 changes: 3 additions & 3 deletions nix/ext/pg_partman.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

stdenv.mkDerivation rec {
pname = "pg_partman";
version = "5.1.0";
version = "5.2.4";

buildInputs = [ postgresql ];

src = fetchFromGitHub {
owner = "pgpartman";
repo = pname;
repo = "${pname}";
rev = "refs/tags/v${version}";
sha256 = "sha256-GrVOJ5ywZMyqyDroYDLdKkXDdIJSDGhDfveO/ZvrmYs=";
hash = "sha256-i/o+JZEXnJRO17kfdTw87aca28+I8pvuFZsPMA/kf+w=";
};

installPhase = ''
Expand Down
1 change: 1 addition & 0 deletions nix/packages/postgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
../ext/pg_hashids.nix
../ext/pgsodium.nix
../ext/pg_graphql.nix
../ext/pg_partman.nix
../ext/pg_stat_monitor.nix
../ext/pg_jsonschema.nix
../ext/pgvector.nix
Expand Down
20 changes: 20 additions & 0 deletions nix/tests/expected/pg_partman.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CREATE SCHEMA IF NOT EXISTS partman_test;
CREATE TABLE partman_test.time_taptest_table
(col1 int,
col2 text default 'stuff',
col3 timestamptz NOT NULL DEFAULT now())
PARTITION BY RANGE (col3);
CREATE INDEX ON partman_test.time_taptest_table (col3);
CREATE TABLE partman_test.time_taptest_table_template (LIKE partman_test.time_taptest_table);
ALTER TABLE partman_test.time_taptest_table_template ADD PRIMARY KEY (col1);
SELECT partman.create_parent(
p_parent_table := 'partman_test.time_taptest_table'
, p_control := 'col3'
, p_interval := '1 day'
, p_template_table := 'partman_test.time_taptest_table_template'
);
create_parent
---------------
t
(1 row)

Loading