Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make ttl & batch_size SUSET #141

Merged
merged 1 commit into from
Aug 23, 2024
Merged

feat: make ttl & batch_size SUSET #141

merged 1 commit into from
Aug 23, 2024

Conversation

soedirgo
Copy link
Member

What kind of change does this PR introduce?

feature

What is the current behavior?

Changing pg_net.ttl and pg_net.batch_size requires ALTER SYSTEM (which is SU-only) and a config reload.

What is the new behavior?

pg_net.ttl and pg_net.batch_size can be changed with ALTER ROLE ... SET ... + a config reload.

@soedirgo soedirgo requested a review from steve-chavez August 22, 2024 04:39
@soedirgo
Copy link
Member Author

P.S. I'm unable to nix-shell on macOS:

❯ nix-shell --show-trace
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/h37bdrm450d1whv8pfsv30wfpri0kir5-24.05/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/h37bdrm450d1whv8pfsv30wfpri0kir5-24.05/pkgs/stdenv/generic/make-derivation.nix:378:7:

          377|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          378|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          379|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       … while evaluating derivation 'net-with-pathod'
         whose name attribute is located at /nix/store/h37bdrm450d1whv8pfsv30wfpri0kir5-24.05/pkgs/stdenv/generic/make-derivation.nix:331:7

       … while evaluating attribute 'text' of derivation 'net-with-pathod'

         at /nix/store/h37bdrm450d1whv8pfsv30wfpri0kir5-24.05/pkgs/build-support/trivial-builders/default.nix:103:16:

          102|       ({
          103|         inherit text executable checkPhase allowSubstitutes preferLocalBuild;
             |                ^
          104|         passAsFile = [ "text" ]

       … while evaluating derivation 'python3.7-mitmproxy-4.0.4'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/interpreters/python/mk-python-derivation.nix:105:3

       … while evaluating attribute 'nativeBuildInputs' of derivation 'python3.7-mitmproxy-4.0.4'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:217:11:

          216|           depsBuildBuild              = lib.elemAt (lib.elemAt dependencies 0) 0;
          217|           nativeBuildInputs           = lib.elemAt (lib.elemAt dependencies 0) 1;
             |           ^
          218|           depsBuildTarget             = lib.elemAt (lib.elemAt dependencies 0) 2;

       … while evaluating derivation 'python3-3.7.6'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:191:11

       … while evaluating attribute 'CPPFLAGS' of derivation 'python3-3.7.6'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/interpreters/python/cpython/default.nix:130:3:

          129|
          130|   CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
             |   ^
          131|   LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);

       … while calling anonymous lambda

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/interpreters/python/cpython/default.nix:130:41:

          129|
          130|   CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
             |                                         ^
          131|   LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);

       … while evaluating derivation 'zlib-1.2.11'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/libraries/zlib/default.nix:18:3

       … while evaluating attribute 'src' of derivation 'zlib-1.2.11'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/libraries/zlib/default.nix:21:3:

           20|
           21|   src = fetchurl {
             |   ^
           22|     urls =

       … while evaluating derivation 'zlib-1.2.11.tar.gz'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/build-support/fetchurl/default.nix:119:3

       … while evaluating attribute 'mirrorsFile' of derivation 'zlib-1.2.11.tar.gz'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/build-support/fetchurl/default.nix:139:10:

          138|
          139|   inherit curlOpts showURLs mirrorsFile postFetch downloadToTemp executable;
             |          ^
          140|

       … while evaluating derivation 'mirrors-list'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/build-support/fetchurl/default.nix:14:7
       … while evaluating attribute 'stdenv' of derivation 'mirrors-list'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:201:18:

          200|           args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
          201|           inherit stdenv;
             |                  ^
          202|

       … while evaluating derivation 'stdenv'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/default.nix:84:14

       … while evaluating attribute 'initialPath' of derivation 'stdenv'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/default.nix:114:14:

          113|
          114|       inherit initialPath shell
             |              ^
          115|         defaultNativeBuildInputs defaultBuildInputs;

       … while evaluating derivation 'xz-5.2.4'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/tools/compression/xz/default.nix:4:3

       … while evaluating attribute 'src' of derivation 'xz-5.2.4'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/tools/compression/xz/default.nix:6:3:

            5|
            6|   src = fetchurl {
             |   ^
            7|     url = "https://tukaani.org/xz/${name}.tar.bz2";

       … while evaluating derivation 'xz-5.2.4.tar.bz2'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/build-support/fetchurl/default.nix:119:3

       … while evaluating attribute 'nativeBuildInputs' of derivation 'xz-5.2.4.tar.bz2'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:217:11:

          216|           depsBuildBuild              = lib.elemAt (lib.elemAt dependencies 0) 0;
          217|           nativeBuildInputs           = lib.elemAt (lib.elemAt dependencies 0) 1;
             |           ^
          218|           depsBuildTarget             = lib.elemAt (lib.elemAt dependencies 0) 2;

       … while evaluating derivation 'curl-7.68.0'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/tools/networking/curl/default.nix:31:3

       … while evaluating attribute 'configureFlags' of derivation 'curl-7.68.0'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:231:11:

          230|           # This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
          231|           configureFlags = let inherit (lib) optional elem; in
             |           ^
          232|             (/**/ if lib.isString configureFlags then [configureFlags]

       … while evaluating derivation 'openssl-1.1.1f'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:191:11

       … while evaluating attribute 'nativeBuildInputs' of derivation 'openssl-1.1.1f'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/stdenv/generic/make-derivation.nix:217:11:

          216|           depsBuildBuild              = lib.elemAt (lib.elemAt dependencies 0) 0;
          217|           nativeBuildInputs           = lib.elemAt (lib.elemAt dependencies 0) 1;
             |           ^
          218|           depsBuildTarget             = lib.elemAt (lib.elemAt dependencies 0) 2;

       … while evaluating derivation 'perl-5.30.1'
         whose name attribute is located at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/interpreters/perl/default.nix:29:5

       … while evaluating attribute 'disallowedReferences' of derivation 'perl-5.30.1'

         at /nix/store/l561dnq1r5xc7g4jwcxpjd5czap64990-2020-04-20/pkgs/development/interpreters/perl/default.nix:41:5:

           40|
           41|     disallowedReferences = [ stdenv.cc ];
             |     ^
           42|

       error: cannot coerce null to a string

@steve-chavez
Copy link
Member

P.S. I'm unable to nix-shell on macOS:
… while evaluating attribute 'nativeBuildInputs' of derivation 'python3.7-mitmproxy-4.0.4'

It's related to the pathod command, which is deprecated and likely has issues with newer python versions. I can clear that on #106 (comment).

@steve-chavez steve-chavez mentioned this pull request Aug 22, 2024
3 tasks
@soedirgo soedirgo merged commit bd95c71 into master Aug 23, 2024
10 checks passed
@soedirgo soedirgo deleted the feat/suset branch August 23, 2024 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants