From fdf3a7c0c3dcd8a51247b78c7cd364ea4a502248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Roche?= Date: Mon, 23 Jun 2025 19:49:50 +0200 Subject: [PATCH] feat: support multiple versions of the pgmq extension Build multiple versions of the pgmq extension on different PostgreSQL versions. Add test for the extensions and their upgrade on PostgreSQL 15 and 17. --- .../pgmq/after-create.sql | 6 +- flake.nix | 2 + nix/ext/pgmq.nix | 111 ++++++++++--- nix/ext/tests/pgmq.nix | 155 ++++++++++++++++++ nix/ext/versions.json | 18 ++ nix/tests/expected/pgmq.out | 14 +- nix/tests/expected/z_15_ext_interface.out | 22 ++- nix/tests/expected/z_17_ext_interface.out | 22 ++- .../expected/z_orioledb-17_ext_interface.out | 22 ++- 9 files changed, 330 insertions(+), 42 deletions(-) create mode 100644 nix/ext/tests/pgmq.nix create mode 100644 nix/ext/versions.json diff --git a/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql b/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql index 050e07dfc..f625c9fb3 100644 --- a/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql +++ b/ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql @@ -18,8 +18,8 @@ begin physical backups everywhere */ -- Detach and delete the official function -alter extension pgmq drop function pgmq.drop_queue; -drop function pgmq.drop_queue; +alter extension pgmq drop function pgmq.drop_queue(TEXT); +drop function pgmq.drop_queue(TEXT); -- Create and reattach the patched function CREATE FUNCTION pgmq.drop_queue(queue_name TEXT) @@ -134,7 +134,7 @@ BEGIN END; $func$ LANGUAGE plpgsql; -alter extension pgmq add function pgmq.drop_queue; +alter extension pgmq add function pgmq.drop_queue(TEXT); update pg_extension set extowner = 'postgres'::regrole where extname = 'pgmq'; diff --git a/flake.nix b/flake.nix index 18cd9ba13..547b0ca81 100644 --- a/flake.nix +++ b/flake.nix @@ -1384,6 +1384,8 @@ devShell = devShells.default; } // pkgs.lib.optionalAttrs (system == "aarch64-linux") { inherit (basePackages) postgresql_15_debug postgresql_15_src postgresql_orioledb-17_debug postgresql_orioledb-17_src postgresql_17_debug postgresql_17_src; + } // pkgs.lib.optionalAttrs (system == "x86_64-linux") { + pgmq = import ./nix/ext/tests/pgmq.nix { inherit self; inherit pkgs; }; }; # Apps is a list of names of things that can be executed with 'nix run'; diff --git a/nix/ext/pgmq.nix b/nix/ext/pgmq.nix index 97a3c27e3..0a028fed4 100644 --- a/nix/ext/pgmq.nix +++ b/nix/ext/pgmq.nix @@ -1,33 +1,92 @@ -{ lib, stdenv, fetchFromGitHub, postgresql }: - -stdenv.mkDerivation rec { +{ + lib, + stdenv, + fetchFromGitHub, + postgresql, + buildEnv, +}: +let pname = "pgmq"; - version = "1.4.4"; - buildInputs = [ postgresql ]; - src = fetchFromGitHub { - owner = "tembo-io"; - repo = pname; - rev = "v${version}"; - hash = "sha256-z+8/BqIlHwlMnuIzMz6eylmYbSmhtsNt7TJf/CxbdVw="; - }; - buildPhase = '' - cd pgmq-extension - ''; + # Load version configuration from external file + allVersions = (builtins.fromJSON (builtins.readFile ./versions.json)).${pname}; + + # Filter versions compatible with current PostgreSQL version + supportedVersions = lib.filterAttrs ( + _: value: builtins.elem (lib.versions.major postgresql.version) value.postgresql + ) allVersions; + + # Derived version information + versions = lib.naturalSort (lib.attrNames supportedVersions); + latestVersion = lib.last versions; + numberOfVersions = builtins.length versions; + packages = builtins.attrValues ( + lib.mapAttrs (name: value: build name value.hash) supportedVersions + ); + + # Build function for individual versions + build = + version: hash: + stdenv.mkDerivation rec { + inherit pname version; + buildInputs = [ postgresql ]; + src = fetchFromGitHub { + owner = "tembo-io"; + repo = pname; + rev = "v${version}"; + inherit hash; + }; + + buildPhase = '' + cd pgmq-extension + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/postgresql/extension + + # Create versioned sql install script + cp sql/${pname}.sql $out/share/postgresql/extension/${pname}--${version}.sql + + # Create versioned control file with modified module path + sed -e "/^default_version =/d" \ + -e "s|^module_pathname = .*|module_pathname = '\$libdir/${pname}'|" \ + ${pname}.control > $out/share/postgresql/extension/${pname}--${version}.control + + # For the latest version, create default control file and symlink and copy SQL upgrade scripts + if [[ "${version}" == "${latestVersion}" ]]; then + { + echo "default_version = '${version}'" + cat $out/share/postgresql/extension/${pname}--${version}.control + } > $out/share/postgresql/extension/${pname}.control + cp sql/*.sql $out/share/postgresql/extension + fi + + runHook postInstall + ''; - installPhase = '' - mkdir -p $out/{lib,share/postgresql/extension} + meta = with lib; { + description = "A lightweight message queue. Like AWS SQS and RSMQ but on Postgres."; + homepage = "https://github.com/tembo-io/pgmq"; + maintainers = with maintainers; [ olirice ]; + inherit (postgresql.meta) platforms; + license = licenses.postgresql; + }; + }; +in +buildEnv { + name = pname; + paths = packages; - mv sql/pgmq.sql $out/share/postgresql/extension/pgmq--${version}.sql - cp sql/*.sql $out/share/postgresql/extension - cp *.control $out/share/postgresql/extension - ''; + pathsToLink = [ + "/share/postgresql/extension" + ]; - meta = with lib; { - description = "A lightweight message queue. Like AWS SQS and RSMQ but on Postgres."; - homepage = "https://github.com/tembo-io/pgmq"; - maintainers = with maintainers; [ olirice ]; - platforms = postgresql.meta.platforms; - license = licenses.postgresql; + passthru = { + inherit versions numberOfVersions; + pname = "${pname}-all"; + version = + "multi-" + lib.concatStringsSep "-" (map (v: lib.replaceStrings [ "." ] [ "-" ] v) versions); }; } diff --git a/nix/ext/tests/pgmq.nix b/nix/ext/tests/pgmq.nix new file mode 100644 index 000000000..6e507e2ba --- /dev/null +++ b/nix/ext/tests/pgmq.nix @@ -0,0 +1,155 @@ +{ self, pkgs }: +let + pname = "pgmq"; + inherit (pkgs) lib; + installedExtension = + postgresMajorVersion: self.packages.${pkgs.system}."psql_${postgresMajorVersion}/exts/${pname}-all"; + versions = postgresqlMajorVersion: (installedExtension postgresqlMajorVersion).versions; + postgresqlWithExtension = + postgresql: + let + majorVersion = lib.versions.major postgresql.version; + pkg = pkgs.buildEnv { + name = "postgresql-${majorVersion}-${pname}"; + paths = [ + postgresql + postgresql.lib + (installedExtension majorVersion) + ]; + passthru = { + inherit (postgresql) version psqlSchema; + lib = pkg; + withPackages = _: pkg; + }; + nativeBuildInputs = [ pkgs.makeWrapper ]; + pathsToLink = [ + "/" + "/bin" + "/lib" + ]; + postBuild = '' + wrapProgram $out/bin/postgres --set NIX_PGLIBDIR $out/lib + wrapProgram $out/bin/pg_ctl --set NIX_PGLIBDIR $out/lib + wrapProgram $out/bin/pg_upgrade --set NIX_PGLIBDIR $out/lib + ''; + }; + in + pkg; +in +self.inputs.nixpkgs.lib.nixos.runTest { + name = pname; + hostPkgs = pkgs; + nodes.server = + { config, ... }: + { + virtualisation = { + forwardPorts = [ + { + from = "host"; + host.port = 13022; + guest.port = 22; + } + ]; + }; + services.openssh = { + enable = true; + }; + + services.postgresql = { + enable = true; + package = postgresqlWithExtension self.packages.${pkgs.system}.postgresql_15; + }; + + specialisation.postgresql17.configuration = { + services.postgresql = { + package = lib.mkForce (postgresqlWithExtension self.packages.${pkgs.system}.postgresql_17); + }; + + systemd.services.postgresql-migrate = { + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + User = "postgres"; + Group = "postgres"; + StateDirectory = "postgresql"; + WorkingDirectory = "${builtins.dirOf config.services.postgresql.dataDir}"; + }; + script = + let + oldPostgresql = postgresqlWithExtension self.packages.${pkgs.system}.postgresql_15; + newPostgresql = postgresqlWithExtension self.packages.${pkgs.system}.postgresql_17; + oldDataDir = "${builtins.dirOf config.services.postgresql.dataDir}/${oldPostgresql.psqlSchema}"; + newDataDir = "${builtins.dirOf config.services.postgresql.dataDir}/${newPostgresql.psqlSchema}"; + in + '' + if [[ ! -d ${newDataDir} ]]; then + install -d -m 0700 -o postgres -g postgres "${newDataDir}" + ${newPostgresql}/bin/initdb -D "${newDataDir}" + ${newPostgresql}/bin/pg_upgrade --old-datadir "${oldDataDir}" --new-datadir "${newDataDir}" \ + --old-bindir "${oldPostgresql}/bin" --new-bindir "${newPostgresql}/bin" + else + echo "${newDataDir} already exists" + fi + ''; + }; + + systemd.services.postgresql = { + after = [ "postgresql-migrate.service" ]; + requires = [ "postgresql-migrate.service" ]; + }; + }; + + }; + testScript = + { nodes, ... }: + let + pg17-configuration = "${nodes.server.system.build.toplevel}/specialisation/postgresql17"; + in + '' + versions = { + "15": [${lib.concatStringsSep ", " (map (s: ''"${s}"'') (versions "15"))}], + "17": [${lib.concatStringsSep ", " (map (s: ''"${s}"'') (versions "17"))}], + } + + def run_sql(query): + return server.succeed(f"""sudo -u postgres psql -t -A -F\",\" -c \"{query}\" """).strip() + + def check_upgrade_path(pg_version): + with subtest("Check ${pname} upgrade path"): + firstVersion = versions[pg_version][0] + server.succeed("sudo -u postgres psql -c 'DROP EXTENSION IF EXISTS ${pname};'") + run_sql(f"""CREATE EXTENSION ${pname} WITH VERSION '{firstVersion}' CASCADE;""") + installed_version = run_sql(r"""SELECT extversion FROM pg_extension WHERE extname = '${pname}';""") + assert installed_version == firstVersion, f"Expected ${pname} version {firstVersion}, but found {installed_version}" + for version in versions[pg_version][1:]: + run_sql(f"""ALTER EXTENSION ${pname} UPDATE TO '{version}';""") + installed_version = run_sql(r"""SELECT extversion FROM pg_extension WHERE extname = '${pname}';""") + assert installed_version == version, f"Expected ${pname} version {version}, but found {installed_version}" + + start_all() + + server.wait_for_unit("multi-user.target") + server.wait_for_unit("postgresql.service") + + check_upgrade_path("15") + + with subtest("Check ${pname} latest extension version"): + server.succeed("sudo -u postgres psql -c 'DROP EXTENSION ${pname};'") + server.succeed("sudo -u postgres psql -c 'CREATE EXTENSION ${pname} CASCADE;'") + installed_extensions=run_sql(r"""SELECT extname, extversion FROM pg_extension;""") + latestVersion = versions["15"][-1] + assert f"${pname},{latestVersion}" in installed_extensions + + with subtest("switch to postgresql 17"): + server.succeed( + "${pg17-configuration}/bin/switch-to-configuration test >&2" + ) + + with subtest("Check ${pname} latest extension version after upgrade"): + installed_extensions=run_sql(r"""SELECT extname, extversion FROM pg_extension;""") + latestVersion = versions["17"][-1] + assert f"${pname},{latestVersion}" in installed_extensions + + check_upgrade_path("17") + ''; +} diff --git a/nix/ext/versions.json b/nix/ext/versions.json new file mode 100644 index 000000000..6cf156119 --- /dev/null +++ b/nix/ext/versions.json @@ -0,0 +1,18 @@ +{ + "pgmq": { + "1.4.4": { + "postgresql": [ + "15" + ], + "hash": "sha256-z+8/BqIlHwlMnuIzMz6eylmYbSmhtsNt7TJf/CxbdVw=" + }, + "1.5.1": { + "postgresql": [ + "15", + "17" + ], + "hash": "sha256-IU+i6ONPwtgsFKdzya6E+222ualR66gkbb0lDr+7Rb8=" + } + + } +} diff --git a/nix/tests/expected/pgmq.out b/nix/tests/expected/pgmq.out index bce379fc7..c2d5d3eec 100644 --- a/nix/tests/expected/pgmq.out +++ b/nix/tests/expected/pgmq.out @@ -160,6 +160,7 @@ order by -------------+-------------------------------+---------- pgmq | _belongs_to_pgmq | postgres pgmq | _ensure_pg_partman_installed | postgres + pgmq | _extension_exists | postgres pgmq | _get_partition_col | postgres pgmq | _get_pg_partman_major_version | postgres pgmq | _get_pg_partman_schema | postgres @@ -174,6 +175,7 @@ order by pgmq | delete | postgres pgmq | detach_archive | postgres pgmq | drop_queue | postgres + pgmq | drop_queue | postgres pgmq | format_table_name | postgres pgmq | list_queues | postgres pgmq | metrics | postgres @@ -183,8 +185,18 @@ order by pgmq | read | postgres pgmq | read_with_poll | postgres pgmq | send | postgres + pgmq | send | postgres + pgmq | send | postgres + pgmq | send | postgres + pgmq | send | postgres + pgmq | send | postgres + pgmq | send_batch | postgres + pgmq | send_batch | postgres + pgmq | send_batch | postgres + pgmq | send_batch | postgres + pgmq | send_batch | postgres pgmq | send_batch | postgres pgmq | set_vt | postgres pgmq | validate_queue_name | postgres -(28 rows) +(40 rows) diff --git a/nix/tests/expected/z_15_ext_interface.out b/nix/tests/expected/z_15_ext_interface.out index 540bee2e8..0c2db0ea7 100644 --- a/nix/tests/expected/z_15_ext_interface.out +++ b/nix/tests/expected/z_15_ext_interface.out @@ -1318,6 +1318,7 @@ order by pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text, text | bytea pgmq | pgmq | _belongs_to_pgmq | table_name text | boolean pgmq | pgmq | _ensure_pg_partman_installed | | void + pgmq | pgmq | _extension_exists | extension_name text | boolean pgmq | pgmq | _get_partition_col | partition_interval text | text pgmq | pgmq | _get_pg_partman_major_version | | integer pgmq | pgmq | _get_pg_partman_schema | | text @@ -1331,6 +1332,7 @@ order by pgmq | pgmq | delete | queue_name text, msg_id bigint | boolean pgmq | pgmq | delete | queue_name text, msg_ids bigint[] | SETOF bigint pgmq | pgmq | detach_archive | queue_name text | void + pgmq | pgmq | drop_queue | queue_name text, partitioned boolean | boolean pgmq | pgmq | drop_queue | queue_name text | boolean pgmq | pgmq | format_table_name | queue_name text, prefix text | text pgmq | pgmq | list_queues | | SETOF pgmq.queue_record @@ -1338,9 +1340,19 @@ order by pgmq | pgmq | metrics_all | | SETOF pgmq.metrics_result pgmq | pgmq | pop | queue_name text | SETOF pgmq.message_record pgmq | pgmq | purge_queue | queue_name text | bigint - pgmq | pgmq | read | queue_name text, vt integer, qty integer | SETOF pgmq.message_record - pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer | SETOF pgmq.message_record + pgmq | pgmq | read | queue_name text, vt integer, qty integer, conditional jsonb | SETOF pgmq.message_record + pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer, conditional jsonb | SETOF pgmq.message_record + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb | SETOF bigint pgmq | pgmq | send | queue_name text, msg jsonb, delay integer | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb, delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb, delay integer | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[] | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[], delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[], delay integer | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[] | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay timestamp with time zone | SETOF bigint pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay integer | SETOF bigint pgmq | pgmq | set_vt | queue_name text, msg_id bigint, vt integer | SETOF pgmq.message_record pgmq | pgmq | validate_queue_name | queue_name text | void @@ -5221,7 +5233,7 @@ order by xml2 | public | xpath_table | text, text, text, text, text | SETOF record xml2 | public | xslt_process | text, text | text xml2 | public | xslt_process | text, text, text | text -(5051 rows) +(5063 rows) /* @@ -5446,6 +5458,7 @@ order by pg_tle | pgtle | feature_info | schema_name pgmq | pgmq | a_foo | archived_at pgmq | pgmq | a_foo | enqueued_at + pgmq | pgmq | a_foo | headers pgmq | pgmq | a_foo | message pgmq | pgmq | a_foo | msg_id pgmq | pgmq | a_foo | read_ct @@ -5455,6 +5468,7 @@ order by pgmq | pgmq | meta | is_unlogged pgmq | pgmq | meta | queue_name pgmq | pgmq | q_foo | enqueued_at + pgmq | pgmq | q_foo | headers pgmq | pgmq | q_foo | message pgmq | pgmq | q_foo | msg_id pgmq | pgmq | q_foo | read_ct @@ -6361,5 +6375,5 @@ order by wrappers | public | wrappers_fdw_stats | rows_in wrappers | public | wrappers_fdw_stats | rows_out wrappers | public | wrappers_fdw_stats | updated_at -(1106 rows) +(1108 rows) diff --git a/nix/tests/expected/z_17_ext_interface.out b/nix/tests/expected/z_17_ext_interface.out index f7750f849..05f4d8e59 100644 --- a/nix/tests/expected/z_17_ext_interface.out +++ b/nix/tests/expected/z_17_ext_interface.out @@ -1303,6 +1303,7 @@ order by pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text, text | bytea pgmq | pgmq | _belongs_to_pgmq | table_name text | boolean pgmq | pgmq | _ensure_pg_partman_installed | | void + pgmq | pgmq | _extension_exists | extension_name text | boolean pgmq | pgmq | _get_partition_col | partition_interval text | text pgmq | pgmq | _get_pg_partman_major_version | | integer pgmq | pgmq | _get_pg_partman_schema | | text @@ -1316,6 +1317,7 @@ order by pgmq | pgmq | delete | queue_name text, msg_id bigint | boolean pgmq | pgmq | delete | queue_name text, msg_ids bigint[] | SETOF bigint pgmq | pgmq | detach_archive | queue_name text | void + pgmq | pgmq | drop_queue | queue_name text, partitioned boolean | boolean pgmq | pgmq | drop_queue | queue_name text | boolean pgmq | pgmq | format_table_name | queue_name text, prefix text | text pgmq | pgmq | list_queues | | SETOF pgmq.queue_record @@ -1323,9 +1325,19 @@ order by pgmq | pgmq | metrics_all | | SETOF pgmq.metrics_result pgmq | pgmq | pop | queue_name text | SETOF pgmq.message_record pgmq | pgmq | purge_queue | queue_name text | bigint - pgmq | pgmq | read | queue_name text, vt integer, qty integer | SETOF pgmq.message_record - pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer | SETOF pgmq.message_record + pgmq | pgmq | read | queue_name text, vt integer, qty integer, conditional jsonb | SETOF pgmq.message_record + pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer, conditional jsonb | SETOF pgmq.message_record + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb | SETOF bigint pgmq | pgmq | send | queue_name text, msg jsonb, delay integer | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb, delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb, delay integer | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[] | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[], delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[], delay integer | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[] | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay timestamp with time zone | SETOF bigint pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay integer | SETOF bigint pgmq | pgmq | set_vt | queue_name text, msg_id bigint, vt integer | SETOF pgmq.message_record pgmq | pgmq | validate_queue_name | queue_name text | void @@ -4865,7 +4877,7 @@ order by xml2 | public | xpath_table | text, text, text, text, text | SETOF record xml2 | public | xslt_process | text, text | text xml2 | public | xslt_process | text, text, text | text -(4708 rows) +(4720 rows) /* @@ -5102,6 +5114,7 @@ order by pg_tle | pgtle | feature_info | schema_name pgmq | pgmq | a_foo | archived_at pgmq | pgmq | a_foo | enqueued_at + pgmq | pgmq | a_foo | headers pgmq | pgmq | a_foo | message pgmq | pgmq | a_foo | msg_id pgmq | pgmq | a_foo | read_ct @@ -5111,6 +5124,7 @@ order by pgmq | pgmq | meta | is_unlogged pgmq | pgmq | meta | queue_name pgmq | pgmq | q_foo | enqueued_at + pgmq | pgmq | q_foo | headers pgmq | pgmq | q_foo | message pgmq | pgmq | q_foo | msg_id pgmq | pgmq | q_foo | read_ct @@ -5286,5 +5300,5 @@ order by wrappers | public | wrappers_fdw_stats | rows_in wrappers | public | wrappers_fdw_stats | rows_out wrappers | public | wrappers_fdw_stats | updated_at -(387 rows) +(389 rows) diff --git a/nix/tests/expected/z_orioledb-17_ext_interface.out b/nix/tests/expected/z_orioledb-17_ext_interface.out index f7750f849..05f4d8e59 100644 --- a/nix/tests/expected/z_orioledb-17_ext_interface.out +++ b/nix/tests/expected/z_orioledb-17_ext_interface.out @@ -1303,6 +1303,7 @@ order by pgcrypto | extensions | pgp_sym_encrypt_bytea | bytea, text, text | bytea pgmq | pgmq | _belongs_to_pgmq | table_name text | boolean pgmq | pgmq | _ensure_pg_partman_installed | | void + pgmq | pgmq | _extension_exists | extension_name text | boolean pgmq | pgmq | _get_partition_col | partition_interval text | text pgmq | pgmq | _get_pg_partman_major_version | | integer pgmq | pgmq | _get_pg_partman_schema | | text @@ -1316,6 +1317,7 @@ order by pgmq | pgmq | delete | queue_name text, msg_id bigint | boolean pgmq | pgmq | delete | queue_name text, msg_ids bigint[] | SETOF bigint pgmq | pgmq | detach_archive | queue_name text | void + pgmq | pgmq | drop_queue | queue_name text, partitioned boolean | boolean pgmq | pgmq | drop_queue | queue_name text | boolean pgmq | pgmq | format_table_name | queue_name text, prefix text | text pgmq | pgmq | list_queues | | SETOF pgmq.queue_record @@ -1323,9 +1325,19 @@ order by pgmq | pgmq | metrics_all | | SETOF pgmq.metrics_result pgmq | pgmq | pop | queue_name text | SETOF pgmq.message_record pgmq | pgmq | purge_queue | queue_name text | bigint - pgmq | pgmq | read | queue_name text, vt integer, qty integer | SETOF pgmq.message_record - pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer | SETOF pgmq.message_record + pgmq | pgmq | read | queue_name text, vt integer, qty integer, conditional jsonb | SETOF pgmq.message_record + pgmq | pgmq | read_with_poll | queue_name text, vt integer, qty integer, max_poll_seconds integer, poll_interval_ms integer, conditional jsonb | SETOF pgmq.message_record + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb | SETOF bigint pgmq | pgmq | send | queue_name text, msg jsonb, delay integer | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb, delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, headers jsonb, delay integer | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb | SETOF bigint + pgmq | pgmq | send | queue_name text, msg jsonb, delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[] | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[], delay timestamp with time zone | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], headers jsonb[], delay integer | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[] | SETOF bigint + pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay timestamp with time zone | SETOF bigint pgmq | pgmq | send_batch | queue_name text, msgs jsonb[], delay integer | SETOF bigint pgmq | pgmq | set_vt | queue_name text, msg_id bigint, vt integer | SETOF pgmq.message_record pgmq | pgmq | validate_queue_name | queue_name text | void @@ -4865,7 +4877,7 @@ order by xml2 | public | xpath_table | text, text, text, text, text | SETOF record xml2 | public | xslt_process | text, text | text xml2 | public | xslt_process | text, text, text | text -(4708 rows) +(4720 rows) /* @@ -5102,6 +5114,7 @@ order by pg_tle | pgtle | feature_info | schema_name pgmq | pgmq | a_foo | archived_at pgmq | pgmq | a_foo | enqueued_at + pgmq | pgmq | a_foo | headers pgmq | pgmq | a_foo | message pgmq | pgmq | a_foo | msg_id pgmq | pgmq | a_foo | read_ct @@ -5111,6 +5124,7 @@ order by pgmq | pgmq | meta | is_unlogged pgmq | pgmq | meta | queue_name pgmq | pgmq | q_foo | enqueued_at + pgmq | pgmq | q_foo | headers pgmq | pgmq | q_foo | message pgmq | pgmq | q_foo | msg_id pgmq | pgmq | q_foo | read_ct @@ -5286,5 +5300,5 @@ order by wrappers | public | wrappers_fdw_stats | rows_in wrappers | public | wrappers_fdw_stats | rows_out wrappers | public | wrappers_fdw_stats | updated_at -(387 rows) +(389 rows)