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 1t1Bsz-00F6kR-Sx for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 21:48:53 +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 1t1Bsy-00Ax70-7v for pgsql-general@arkaria.postgresql.org; Wed, 16 Oct 2024 21:48:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1Bsx-00Ax3w-Q7 for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 21:48:52 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t1Bsv-001FfC-2M for pgsql-general@lists.postgresql.org; Wed, 16 Oct 2024 21:48:50 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 1F07126EA; Wed, 16 Oct 2024 23:48:47 +0200 (CEST) Date: Wed, 16 Oct 2024 23:48:47 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Backup Message-ID: <20241016214847.yzfvfkvfnnlm2ba3@hjp.at> Mail-Followup-To: pgsql-general@lists.postgresql.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hxjb722czvq44xdf" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hxjb722czvq44xdf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-10-16 16:02:24 -0400, Ron Johnson wrote: > On Wed, Oct 16, 2024 at 4:00=E2=80=AFPM Achilleas Mantzios < > a.mantzios@cloud.gatewaynet.com> wrote: > =CE=A3=CF=84=CE=B9=CF=82 16/10/24 22:55, =CE=BF/=CE=B7 Ron Johnson = =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > On Wed, Oct 16, 2024 at 3:37=E2=80=AFPM Andy Hartman > wrote: [...] >=20 > Step 1: redesign your DB to NOT=C2=A0use large objects.=C2=A0 It'= s an old, slow > and unmaintained data type.=C2=A0 The data type is what you shoul= d use. >=20 > You mean bytea I guess. As a side note, (not a fan of LOs), I had the > impression that certain drivers such as the JDBC support streaming fo= r LOs > but not for bytea? It's been a while I haven't hit the docs tho. >=20 >=20 > Our database is stuffed with images in bytea fields.=C2=A0 The Java appli= cation uses > JDBC and handles them just fine. Images are usually small enough (a few MB) that they don't need to be streamed. I don't think bytea can be streamed in general. It's just like text, you write and read the whole thing at once. If you have data which is too large for that and want to store it in bytea fields, you'll probably have to chunk it yourself (which you probably have to anyway because for me "so large it has to be streamed" implies "at least possibly larger than 1 GB"). hp --=20 _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | hjp@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" --hxjb722czvq44xdf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAmcQNLgACgkQ8g5IURL+ KF2PRw//T9IC6acSOJ3qAjGDYg+uoyQNf8te2STKc71PUpSC5knJ+0eKasv7ue7I GavlbNGJ+gNQzH3LgGjOpqjpMuRuYXuuedOffZj6Ea/w9KCsnT0CgzizqYwRQUPz CXXTu5awfU4uRLZOAaLTMEpwrSI1b6qHPb/qNgzI7GtjbmrmOBJP7QmbQa6+rIzD EQQpG4Byyzzj0o9iYaeqZlpp7ByOukA/xv1/OZUORokdXvLYJfoR+EZyDPqeLL/x 309BjsO1r6rK1aAQF9sl51GBlXbal+80PMwnL/yBjcP1/tfgkQC/pJnsl6edsQWE A07zOz/TAt+t/fVpS163yCou2O1mQoFqQva87F/sXj19zJb5uGhSzP+B1yT0iZR6 uCR7ic7rFHPDT7RQOCadJYu9V4de1hsydQnqo1Wr+pVajU+1mMaUoGA+KKwtxlCJ 6gIZkepbUiIVO1vO9f2IqRi7B+k/0atCW5L+AXgI6Zktni9ujKBuECaYrNeuSdNk uva3QtfkzpOCKWtZKqVUAsijAi0Dk6Fec+/ZYqDTLJpyDLXY2dbJ9QsrgsN52Bge dBxSM94afGYsIzTRxpHbRt55Cj9FDiIJOvHWZK4V5gefVFY6J3pBktkwgUf9XUe7 hzkBC2fLPcI15vQx8r7cHkKp3/2/n+pmHT+O3vnG96VMwLTXM5w= =RGfL -----END PGP SIGNATURE----- --hxjb722czvq44xdf--