Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFA1b-0006bl-KQ for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Jan 2023 08:30:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFA1a-0002rj-H5 for pgsql-bugs@arkaria.postgresql.org; Tue, 10 Jan 2023 08:30:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pF9rr-0005DS-Ap for pgsql-bugs@lists.postgresql.org; Tue, 10 Jan 2023 08:20:23 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pF9rp-0003mE-2C for pgsql-bugs@lists.postgresql.org; Tue, 10 Jan 2023 08:20:22 +0000 Received: by mail-ej1-x62f.google.com with SMTP id vm8so26550021ejc.2 for ; Tue, 10 Jan 2023 00:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subzero-cloud.20210112.gappssmtp.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=oWSnd9q+a8uK51Vv4TD25TXGLIGJjsTshhc5CF/xM+U=; b=OB/0NSODrIpgxl9G5V5jq9QinA9AIC1Nz4SC9otOtdzNrGsHLg9CLtL/mMzV8ABQVM hYWRhjdy4KCIyM+ES8hm5rEiUwtn7ypQ5hc7Q0qQmRYcVH1abdxXRLeDU2upk4q3tx+K hMR/rdZi+FSM83O+2gxY3gUd+dOhG7xIBhlkZNfu2KZzqd8nOYIgDf8A6KpKkLsFat/N kT3NdfwkJK8cmoHP2tlI6oyLC4nIeFza84QUxRaU/LpVDPO/80PFMQUFwQc0kJS0rDza Q8RNGUVQqry1SkCeaxOIXKXUa7tI+b84qyW411BEhfISfJe9SMz7JfIK3kDOrrTo5pWK Z6tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oWSnd9q+a8uK51Vv4TD25TXGLIGJjsTshhc5CF/xM+U=; b=WyPbQB3Gb0a+CL7jm0UQeCv+jbegs3VTE68txWeIVsR/BTf9ow2AuK14kyfLungunp kbRfigl0zT2qrMKpq4XXkC5RFh2AI9eqOiZM7oL/dvdTCOZwIEeD9vTQKYc3TL++4t+g XIliDHfytQDzUb44XY8q71nBNvd6kha2vIOS1ii4cBcJDnuatJgCr65TckrMkRcxoNzg +qVzx6T2q1EdGtgwxT+tAQIGpTBPtaSWeTxX1u7wlMskSPF+NM5q9ajuWqlIdADZCo+x C2QrfqMcydvrluoewxMq0aZkCDQyDgq1XXliBzycxQ1JjPmFlOMX59FUzPTwA3hktGvR d/Pw== X-Gm-Message-State: AFqh2krxSxuc8ROkQDpANiMeldxpQLJnGvmV5EzhRN8UzG2ny8ml1aKf zGdIX18dg8D4+O+Mw8vi2tw0jWusV3Q5wkrz X-Google-Smtp-Source: AMrXdXsHB7YaQqQdcKH0S9rkKRTm6iM4+xkkOQMG9UQSro9WXQV7oTwgTlvkY6aqPHEq5YropndCog== X-Received: by 2002:a17:906:1398:b0:84d:47e3:fe49 with SMTP id f24-20020a170906139800b0084d47e3fe49mr6048902ejc.39.1673338820025; Tue, 10 Jan 2023 00:20:20 -0800 (PST) Received: from smtpclient.apple ([86.127.142.246]) by smtp.gmail.com with ESMTPSA id j2-20020aa7de82000000b004972644b19fsm4413724edv.16.2023.01.10.00.20.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2023 00:20:19 -0800 (PST) From: Ruslan Talpa Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: set_config with is_local parameter true escapes transaction boundaries Message-Id: <997A11B3-BC14-44FB-A505-BE7C49BE5330@subzero.cloud> Date: Tue, 10 Jan 2023 10:20:08 +0200 To: pgsql-bugs@lists.postgresql.org X-Mailer: Apple Mail (2.3731.200.110.1.12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk When executing set_config with the parameter =E2=80=98is_local=E2=80=99 = set to true within a transaction, it is expected that the config value = is not available after the transaction however once the config is set in = any transaction, current_setting will return an empty string instead of = null If this is expected behaviour, it is not mentioned anywhere in the = documentation. Steps to reproduce / example psql (13.9, server 15.1 (Debian 15.1-1.pgdg110+1)) WARNING: psql major version 13, server major version 15. Some psql features might not work. Type "help" for help. app=3D# select current_setting('custom.a', true), = current_setting('custom.a', true) is null; current_setting | ?column? -----------------+---------- | t (1 row) app=3D# BEGIN; START TRANSACTION app=3D*# select set_config('custom.a', 'vv', true); set_config ------------ vv (1 row) app=3D*# COMMIT; COMMIT app=3D# select current_setting('custom.a', true), = current_setting('custom.a', true) is null; current_setting | ?column? -----------------+---------- | f (1 row)