Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTwjS-003vIu-Nu for pgsql-general@arkaria.postgresql.org; Wed, 17 Jul 2024 04:57:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sTwjQ-006VdH-VS for pgsql-general@arkaria.postgresql.org; Wed, 17 Jul 2024 04:57:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTwjQ-006Vd5-KJ for pgsql-general@lists.postgresql.org; Wed, 17 Jul 2024 04:57:36 +0000 Received: from smtp106.iad3a.emailsrvr.com ([173.203.187.106]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTwjO-002Wjk-BP for pgsql-general@lists.postgresql.org; Wed, 17 Jul 2024 04:57:35 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp14.relay.iad3a.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 3869323B21; Wed, 17 Jul 2024 00:57:32 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: Qualifying use of separate TABLESPACES (performance/functionality) From: Christophe Pettus In-Reply-To: Date: Tue, 16 Jul 2024 21:57:01 -0700 Cc: pgsql-general@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <70BDA5E1-F800-44CB-A1FC-C7597D53ABCD@thebuild.com> References: To: Imndlf8r@gmx.com X-Mailer: Apple Mail (2.3774.600.62) X-Classification-ID: cc04da5f-be31-407b-9322-b61695969859-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Jul 16, 2024, at 21:45, Imndlf8r@gmx.com wrote: > Or, does Postgres expect to be able to access any media however it = wants > (i.e., R/w), regardless of the expected access patterns of the data = stored > there? Well, yes and no. PostgreSQL will not respond well to having media that is literally read = only in the sense that a write operation to it will fail. At some = point, it will need to (for example) vacuum the tables, and that will = means writes. That being said, if the only thing in a tablespace are = tables (and their indexes) that are written once then never again, you = won't be constantly getting writes to them. You may want to do a VACUUM = (ANALYZE, FREEZE) on the tables in those tablespaces once the data is = loaded. PostgreSQL will be generating WAL as you do data-modifying operations, = so that should be aimed at storage that very low write fatigue. Be very = cautious about using a RAM disk for anything, though, unless you are = *very* confident the battery backup on it is 100% reliable. PostgreSQL = isn't designed to handle recovery from having the WAL just disappear out = from under it on a crash.=