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 1pb3e6-0007G3-Qo for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Mar 2023 18:08:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pb3e5-000289-H3 for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Mar 2023 18:08:41 +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 1pb3e5-000280-6d for pgsql-hackers@lists.postgresql.org; Sat, 11 Mar 2023 18:08:41 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pb3e1-0007Zc-WB for pgsql-hackers@postgresql.org; Sat, 11 Mar 2023 18:08:40 +0000 Received: by mail-pj1-x1034.google.com with SMTP id kb15so8275970pjb.1 for ; Sat, 11 Mar 2023 10:08:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1678558116; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fBWjE9Vl7gpGGHMts6NfjbKQng4XnUpNi7gd1hHBJ9w=; b=RxF+rsl8U4wUut4mDcF9ZX96BrLmEL6jgMla/vDubi1FAktmBd14ydxpVOrT76uPv8 T+V+n6SvBr3yY+Oo7PumRaRX+8noA2B0s49j9ZPeB9avAxSQjCv9awXHB5U+Zfz/ayMq w+09eAl7V4lnvxFgm1aij4pfYdVaQvWmvgh2Mld+7hwxGcmeVUAu6TjjrfKuCsSa4vBh sLQw7UdLXyX/oXngygMfRILQjEM8aD+zauKAdHvjP92XSAynHVfkNuwXoq8F1+kt9pEX xJoE6MOaTtYeqfK4SuUVOXq4pegSbf3TGU4pJOmvsshFLnCDZp9OjSfUQWfBwP5bsXvN fXaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678558116; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fBWjE9Vl7gpGGHMts6NfjbKQng4XnUpNi7gd1hHBJ9w=; b=WpJ0RzXGuTeWklR/jFm6YGt6QexvYT9hoVbgLPCLegwvNy7LHH6xiXheEuj9Oe+BXr G5fxTs8Ml34JzQP+wReJbIVs/A2FHju+XOCVAXEkr7UiW3ExnRsbddgyOkPQjWaxF9Sr gqW+3cle+Qz633hY9Gq0sPtk9eTzXnyEgjhGFqMR1c7WtuVkSIeN8LgD8EoYPoQWXXZU Zt88Lbf/3wwG0ASTF85lB9QbqtFrGkQGrFSdJKl2L4R2fAIQbopCrMM8F7Un0QUhDkJ5 UcHEzI9gbWfBfzKb/tcauAtNSAg65yHIqryWh67Dfs1WvAUVydRP2SU4KrwjcEcGWbwW Vygw== X-Gm-Message-State: AO0yUKWEB/j1sAHRyQi3y7mJ9E5B9hwVSvHZe1k/PP06pIIraKA6gD1z fpcnsx937GdCZDNt24U0IEuqvq0IYF9cRqnwPkzPM8ox8nHvDl25c5Ik0FdUZoV8b+RWniGmU19 F90fijpkAV8Nl/jXpK2m5rXzq+4Gkf2mQMS3j4amry9gIggxM0dMEy0u+3a3J30zk2sxJ3Ohxv7 20fMl5Z5ySX2KADsl2ybwFsAoA4Xu8iF5VSXMj X-Google-Smtp-Source: AK7set+vkHVRIJrolamTm8+v3dmw9eYfOqDw8ZOhOU2PNJbyi1tTuSgxbMhJLaohq65HBVE5enVryA== X-Received: by 2002:a17:902:d2d0:b0:19e:2e6b:1448 with SMTP id n16-20020a170902d2d000b0019e2e6b1448mr35085668plc.2.1678558115610; Sat, 11 Mar 2023 10:08:35 -0800 (PST) Received: from smtpclient.apple (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id t10-20020a63dd0a000000b004fb11a7f2d4sm1816967pgg.57.2023.03.11.10.08.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Mar 2023 10:08:35 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: Transparent column encryption From: Mark Dilger In-Reply-To: <7a430d89-233b-5cd7-6892-9fed06695d39@enterprisedb.com> Date: Sat, 11 Mar 2023 10:08:32 -0800 Cc: pgsql-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <8B88C587-8E7C-47AC-9984-DC55CB80E581@enterprisedb.com> References: <89157929-c2b6-817b-6025-8e4b2d89d88f@enterprisedb.com> <79f08a39-a7da-5157-cef4-378fb60c18f8@enterprisedb.com> <258c5064-437e-f41e-7537-5e8c343c33cc@enterprisedb.com> <6bd99fea-3298-854d-d37f-554151342f36@enterprisedb.com> <963aa100-7e78-3463-0645-700eaaa325f2@enterprisedb.com> <06830254-6d87-86b2-0280-bf2eee7736a5@enterprisedb.com> <75f394fa-f539-1875-079c-c654deceed41@enterprisedb.com> <8bcedb49-1496-0755-bd24-1cbabf30ec84@enterprisedb.com> <1034b6f1-ccab-8a22-c843-71104ebedf01@enterprisedb.com> <40c43d0d-ae4b-fe34-2667-771b3718384e@enterprisedb.com> <47e17f03-6595-6c09-8978-7a1581cad6f2@enterprisedb.com> <7a430d89-233b-5cd7-6892-9fed06695d39@enterprisedb.com> To: Peter Eisentraut X-Mailer: Apple Mail (2.3731.400.51.1.1) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Mar 9, 2023, at 11:18 PM, Peter Eisentraut = wrote: >=20 > Here is an updated patch. Thanks, Peter. The patch appears to be in pretty good shape, but I have = a few comments and concerns. CEKIsVisible() and CMKIsVisible() are obviously copied from = TSParserIsVisible(), and the code comments weren't fully updated. = Specifically, the phrase "hidden by another parser of the same name" = should be updated to not mention "parser". Why does get_cmkalg_name() return the string "unspecified" for = PG_CMK_UNSPECIFIED, but the next function get_cmkalg_jwa_name() returns = NULL for PG_CMK_UNSPECIFIED? It seems they would both return NULL, or = both return "unspecified". If there's a reason for the divergence, = could you add a code comment to clarify? BTW, get_cmkalg_jwa_name() has = no test coverage. =20 Looking further at code coverage, the new conditional in = printsimple_startup() is never tested with = (MyProcPort->column_encryption_enabled), so the block is never entered. = This would seem to be a consequence of backends like walsender not using = column encryption, which is not terribly surprising, but it got me = wondering if you had a particular client use case in mind when you added = this block? The new function pg_encrypted_in() appears totally untested, but I have = to wonder if that's because we're not round-trip testing pg_dump with = column encryption...? The code coverage in pg_dump looks fairly decent, = but some column encryption code is not covered. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company