Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsBho-0001jm-Gs for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Aug 2018 18:48:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fsBhm-0000FX-Om for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Aug 2018 18:48:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsBhm-0000FO-Fy for pgsql-hackers@lists.postgresql.org; Tue, 21 Aug 2018 18:48:38 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fsBhj-0006nu-J9 for pgsql-hackers@lists.postgresql.org; Tue, 21 Aug 2018 18:48:37 +0000 Received: by mail-wm0-x236.google.com with SMTP id y139-v6so1131580wmc.2 for ; Tue, 21 Aug 2018 11:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c0qnB9tFU4Z/a+bVlb9zQKpBYr527WE/n/hu3ClbWxw=; b=d0yrG/QGVk81siWxRNd9WjwWlLWnjbI9dKx8w+aoIiahmYXOfNFKLl+C46nSoF1QLl QHolyfrUMyt8xElp0ucoaIHDXR62Rr9m5IM/mC/mgxDByiAaiOvUygHyC8bu3jY+AjcD s4kAywILrqsexxBNvdplzcEDjpHvn2x11PMiBYc/SMm/Xz7WAP+vJs4P+7NN59xGXSfg ib3UNe7O83Kagaqb7KBOk/wiWoMSAsM1HuckoNF+L+fJ8bZq4Z2vt3txfN0aw5l3s48v vcATy+X3oxCcp+xn6gfQGUVc0OE/vg8P2XSHiYS3ciDsKV8r6CXRpdbUIe1xQ8WKq/Dg Bsbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c0qnB9tFU4Z/a+bVlb9zQKpBYr527WE/n/hu3ClbWxw=; b=jtcYogXVrYDf9rAylIKsklSMfn1IfJ/aJZzJGtS2XzYRmjpFCe02zChxhuDS2MfrQg tsOcnKUbwsUufjtWXHMSGit4qJGDrgTA0IvUVxH6HXlAR65xU8SGyV39g+LTu72lXVpb g7Jf9yg4MOkbSxA7wJaiNUTIV5jSDnzydWh2pAVyZM9WBtou9tvBgfSI6+p2b2Jfgn/B 2/seBbrj/Sf0rKIF2NTEIks9mc1KvBAJSjxuQVONeeogmWyZch85ArDRptdhVatxN1vX 67mzmzvHaiK6/Z5oVTABq/VFGsmI0hzO5Q09KPxjuI2qV9uJ5lyLcjltt0C4TPAEHG1W 9KnQ== X-Gm-Message-State: APzg51CW6kt5QUJJyCDxCoi8Ba5qfXC2Y1CuoMM38YUSn4wqUCyrrhnF 0mxd3uq4tF6ipZ+u/d43vhgKwEOkJuQCkgVCKlgAwA== X-Google-Smtp-Source: ANB0VdaFOv4XUPEukUmQRRSkjAHpELW/JJaV4OYjbl613Jt3+UoRvb18GoJNaUo0W58oW7TrkYvuOiIS89t7HpkzwbY= X-Received: by 2002:a1c:2108:: with SMTP id h8-v6mr369636wmh.108.1534877314208; Tue, 21 Aug 2018 11:48:34 -0700 (PDT) MIME-Version: 1.0 References: <623395617.20171113141500@gf.microolap.com> <28924bcc-9242-9798-e4e8-9d83cea3fef6@dalibo.com> In-Reply-To: From: Pavel Stehule Date: Tue, 21 Aug 2018 20:48:25 +0200 Message-ID: Subject: Re: [HACKERS] proposal: schema variables To: Fabien COELHO Cc: Gilles Darold , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000165a3a0573f679d4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000165a3a0573f679d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Fabien Dne =C3=BAt 21. 8. 2018 19:56 u=C5=BEivatel Fabien COELHO napsal: > > Hello Pavel, > > AFAICR, I had an objection on such new objects when you first proposed > something similar in October 2016. > > Namely, if session variables are not transactional, they cannot be used t= o > implement security related auditing features which were advertised as the > motivating use case: an the audit check may fail on a commit because of a > differed constraint, but the variable would keep its "okay" value unduly, > which would create a latent security issue, the audit check having failed > but the variable saying the opposite. > > So my point was that they should be transactional by default, although I > would be ok with an option for having a voluntary non transactional > version. > > Is this issue addressed somehow with this ? 1. I respect your opinion, but I dont agree with it. Oracle, db2 has similar or very similar feature non transactional, and I didnt find any requests to change it. 2. the prototype implementation was based on relclass items, and some transactional behave was possible. Peter E. had objections to this design and proposed own catalog table. I did it. Now, the transactional behave is harder to implement, although it is not impossible. This patch is not small now, so I didnt implement it. I have a strong opinion so default behave have to be non transactional. Transactional variables significantly increases complexity of this patch, now is simple, because we can reset variable on drop variable command. Maybe I miss some simply implementation, but I spent on it more than few days. Still, any cooperation are welcome. Regards Pavel > -- > Fabien. > --000000000000165a3a0573f679d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Fabien

Dne =C3=BAt 21. 8. 2018 19:56 u=C5=BEivatel Fabien COELHO <coelho@cri.ensmp.fr> napsal:
<= /div>

Hello Pavel,

AFAICR, I had an objection on such new objects when you first proposed
something similar in October 2016.

Namely, if session variables are not transactional, they cannot be used to =
implement security related auditing features which were advertised as the <= br> motivating use case: an the audit check may fail on a commit because of a <= br> differed constraint, but the variable would keep its "okay" value= unduly,
which would create a latent security issue, the audit check having failed <= br> but the variable saying the opposite.

So my point was that they should be transactional by default, although I would be ok with an option for having a voluntary non transactional
version.

Is this issue addressed somehow with this ?


1. I res= pect your opinion, but I dont agree with it. Oracle, db2 has similar or ver= y similar feature non transactional, and I didnt find any requests to chang= e it.=C2=A0

2. the proto= type implementation was based on relclass items, and some transactional beh= ave was possible. Peter E. had objections to this design and proposed own c= atalog table. I did it. Now, the transactional behave is harder to implemen= t, although it is not impossible. This patch is not small now, so I didnt i= mplement it. I have a strong opinion so default behave have to be non trans= actional.

Transactional = variables significantly increases complexity of this patch, now is simple, = because we can reset variable on drop variable command. Maybe I miss some s= imply implementation, but I spent on it more than few days. Still, any coop= eration are welcome.

Reg= ards

Pavel