Skip to content

Commit 0aa2c06

Browse files
samrosepashkinelfe
authored andcommitted
feat: add our updated fork of pg_backtrace
1 parent 570dbb3 commit 0aa2c06

File tree

4 files changed

+36
-1
lines changed

4 files changed

+36
-1
lines changed

ansible/files/postgresql_config/postgresql.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ default_text_search_config = 'pg_catalog.english'
688688
#local_preload_libraries = ''
689689
#session_preload_libraries = ''
690690

691-
shared_preload_libraries = 'pg_stat_statements, pg_stat_monitor, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle, plan_filter' # (change requires restart)
691+
shared_preload_libraries = 'pg_stat_statements, pg_stat_monitor, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, pg_tle, plan_filter, pg_backtrace' # (change requires restart)
692692
jit_provider = 'llvmjit' # JIT library to use
693693

694694
# - Other Defaults -

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
./nix/ext/postgis.nix
103103
./nix/ext/pgrouting.nix
104104
./nix/ext/pgtap.nix
105+
./nix/ext/pg_backtrace.nix
105106
./nix/ext/pg_cron.nix
106107
./nix/ext/pgsql-http.nix
107108
./nix/ext/pg_plan_filter.nix

nix/ext/pg_backtrace.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{ lib, stdenv, fetchFromGitHub, postgresql }:
2+
3+
stdenv.mkDerivation rec {
4+
pname = "pg_backtrace";
5+
version = "1.0";
6+
7+
buildInputs = [ postgresql ];
8+
9+
src = fetchFromGitHub {
10+
owner = "pashkinelfe";
11+
repo = pname;
12+
rev = "fddeeb4ae0a8aa8993336463ef0d5fcd5b4b7cfd";
13+
hash = "sha256-o3bgPckh5KMHBgSiEmhmFSibbJzeIPOUTNyeLVh6Pkk=";
14+
};
15+
16+
makeFlags = [ "USE_PGXS=1" ];
17+
18+
installPhase = ''
19+
mkdir -p $out/{lib,share/postgresql/extension}
20+
21+
cp *.so $out/lib
22+
cp *.sql $out/share/postgresql/extension
23+
cp *.control $out/share/postgresql/extension
24+
'';
25+
26+
meta = with lib; {
27+
description = "Updated fork of pg_backtrace";
28+
homepage = "https://github.com/pashkinelfe/pg_backtrace";
29+
maintainers = with maintainers; [ samrose ];
30+
platforms = postgresql.meta.platforms;
31+
license = licenses.postgresql;
32+
};
33+
}

nix/tests/prime.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,4 @@ create extension xml2;
9999

100100

101101

102+
CREATE EXTENSION IF NOT EXISTS pg_backtrace;

0 commit comments

Comments
 (0)