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 1ndp4b-0000fZ-1O for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Apr 2022 08:06:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ndp3a-00023g-Rv for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Apr 2022 08:05:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ndp3a-00023X-GI for pgsql-hackers@lists.postgresql.org; Mon, 11 Apr 2022 08:05:54 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ndp3V-0007mG-GN for pgsql-hackers@lists.postgresql.org; Mon, 11 Apr 2022 08:05:53 +0000 Received: by mail-wr1-x436.google.com with SMTP id v2so8060567wrv.6 for ; Mon, 11 Apr 2022 01:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:comments:mime-version :content-id:content-transfer-encoding:date:message-id; bh=GP6N99KWT0RsDFqB0Xr1rwyLWR7Q+ngHfSwR0ShYMuA=; b=wAXLbgUwQY1gk+KLSJp/wbsNjJsnDMjVNSof24Lf6UhDjU7oA+1yRvgsIbQrmb08WT ivLLA0he/9aWXs/CTFf33tdBLlKMcmDtUDgVdWvwrJWLl64Akpq4TwrouS+YwYjClMxw MrS8V8BvTYS5oLb4pyB7m3E0mpzdCV60vKaPZjUT26mJ8KwOmPI7dwxRwpGlSz/bgI39 DGWghRpLBGsgcwGH3UIZSnMkI2eAxWru3eP0lQZLSYnXAdDQqYHz55YCYUoIfS+Lh/Vd Ug7drkbCIvldCypYGCW9LoumPZRpcl7pmcqrVzG5cA4Mm5I7NisLFsBumXs4jyvZQDQZ H//A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :comments:mime-version:content-id:content-transfer-encoding:date :message-id; bh=GP6N99KWT0RsDFqB0Xr1rwyLWR7Q+ngHfSwR0ShYMuA=; b=iCpCrCT9rD+VfLi4YFDhmznt9osTpr2llGQa8jFkdPOubjAA3p7A3Ydt0hnBHdEaFL 6TgFvOgJ2HVY36ajUvXR0IP6GUU3HA5Vi3ciZBhRbvVhUKeXpdFNGG3qcMTHIQgDqJiq vI5QJQvS++4kag73UQsGuPy8BGGEvRPWh+iSKLwDga3covTEo/74hncxz+sXIQOYnIhi IznPAsqYK4W+jZOFTYoIrvcNJDHLwO5As9nmXn+lC6uJg+LIEyoJ3Wbue2zNbzYAHGDJ pgDT2xwEW/ArhQDvW9WqcTjVvseJE2Wi+dxu1L8pj1vcMhB7PuH6Rp827ZQDH+FdR+jy MHXg== X-Gm-Message-State: AOAM5328j2AR3sRO8rIZxP5u5x5tCWk9ED5AXBKrKpsyrYZ4RJ4RdL3/ teC90B9c/aMB9I/q45FMmcZXew== X-Google-Smtp-Source: ABdhPJzxfQxRYRqUMl+TqzO/M3Pik7lZTDeum68r8hB8TSI5epKYVMmcfrzjHB7tvwMEywC1ldDdJQ== X-Received: by 2002:adf:e289:0:b0:1e3:14ad:75fe with SMTP id v9-20020adfe289000000b001e314ad75femr24122483wri.685.1649664347480; Mon, 11 Apr 2022 01:05:47 -0700 (PDT) Received: from antos (85-207-121-76.static.bluetone.cz. [85.207.121.76]) by smtp.gmail.com with ESMTPSA id j9-20020a5d4529000000b00207a5b7f613sm2818612wra.69.2022.04.11.01.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 01:05:46 -0700 (PDT) From: Antonin Houska To: Robert Haas cc: Stephen Frost , PostgreSQL Hackers Subject: Re: Temporary file access API In-reply-to: References: <4987.1644323098@antos> <20220301143431.GT10577@tamriel.snowman.net> <27013.1646738099@antos> <3146.1649408068@antos> Comments: In-reply-to Robert Haas message dated "Fri, 08 Apr 2022 12:01:22 -0400." X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 27.2.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2131.1649664364.1@antos> Content-Transfer-Encoding: quoted-printable Date: Mon, 11 Apr 2022 10:06:04 +0200 Message-ID: <2132.1649664364@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas wrote: > On Fri, Apr 8, 2022 at 4:54 AM Antonin Houska wrote: > > Do you think that the use of a system call is a problem itself (e.g. b= ecause > > the code looks less simple if read/write is used somewhere and fread/f= write > > elsewhere; of course of read/write is mandatory in special cases like = WAL, > > heap pages, etc.) or is the problem that the system calls are used to= o > > frequently? I suppose only the latter. > = > I'm not really super-interested in reducing the number of system > calls. It's not a dumb thing in which to be interested and I know that > for example Thomas Munro is very interested in it and has done a bunch > of work in that direction just to improve performance. But for me the > attraction of this is mostly whether it gets us closer to TDE. > = > And that's why I'm asking these questions about adopting it in > different places. I kind of thought that your previous patches needed > to encrypt, I don't know, 10 or 20 different kinds of files. So I was > surprised to see this patch touching the handling of only 2 kinds of > files. If we consolidate the handling of let's say 15 of 20 cases into > a single mechanism, we've really moved the needle in the right > direction -- but consolidating the handling of 2 of 20 cases, or > whatever the real numbers are, isn't very exciting. There are't really that many kinds of files to encrypt: https://wiki.postgresql.org/wiki/Transparent_Data_Encryption#List_of_the_f= iles_that_contain_user_data (And pg_stat/* files should be removed from the list.) -- = Antonin Houska Web: https://www.cybertec-postgresql.com