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 1jM7bg-00073A-0J for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2020 10:06:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jM7bd-0007dz-T9 for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2020 10:06:49 +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 1jM7bd-0007dr-Gp for pgsql-admin@lists.postgresql.org; Wed, 08 Apr 2020 10:06:49 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jM7ba-0006Mc-AP for pgsql-admin@lists.postgresql.org; Wed, 08 Apr 2020 10:06:48 +0000 Received: by mail-wm1-x343.google.com with SMTP id d202so4798910wmd.1 for ; Wed, 08 Apr 2020 03:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=Cn4vEbdrDXdHoncykIFGdkiBGOBjaYXblJQ2ReTQQEA=; b=Ilg7QWXbNBvyXAgKIruZ4QzAEJLp1bB6CAUHfGduLOqT9ky2utTN9CFROfydHyrnxp wRrcIZ77JuGlc9dcmB2xNACY8DM24U+tey0N5v0OFx9tmlsJ2rneUoBoRjesr4/IOupX DpDSteXVF3pSh9lz4/NCikBYJEswSpEvZJ50JnjmQ25IlIB+sYFgleGXYbWGmIRwRcAi DKRs3pp/nTrxiteGvxJzqsmug8u6F1ZW4oWN9L1sVj1Gx0jvj9WVe8mQ1bK5NFaGCkmx MyzDrxhJNFgakfjOigDkPKuCcyi0GG17/xHYwdokoSZzVpMJK6d+Jc91rVhL+pFM2BOt Eogw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Cn4vEbdrDXdHoncykIFGdkiBGOBjaYXblJQ2ReTQQEA=; b=L5X3TCHdEmcqce+2xsMfFoOxlE7ulZtJAlf3+77twMOGfayKTaCDVSJFCkxu2HdHhT AcrPw0LsC5Ts/bdgNp0fb+kIIUYWeAokmqT1fakf79Q35BaRb37InDwscgjZItET8XuA ZEIMzQtm/sVvwA9Z9szjG3fYLQNMSYGTxh10GUaZexnsQNikuB2YR/8U50Mt5jYBcf3K W2MhiHExKKNP5/kfduRbBZaZVf/AG6s8QSk3fuzqNwra/6LJP0yAAjocNnznjL5UY0LT B3MaNaDXqWjrhPk/OK0R4Clhm7AqslvFoW6EGMCSOx+dsMNCuiro96qI3+2macgsJEeF 28lA== X-Gm-Message-State: AGi0PuaNo6/GPs+HgjaPI0TgftNt0smj/PM5606vdGazjuKsHqYg4Zqx Y4tZWdrUJopzNGOEykqttKJBiw== X-Google-Smtp-Source: APiQypJCimlfB0nbOHm1Ymzmftn4UQh3lB04PWYntIdv1rKs0um6OkIYvxhmB5dRjh0qGcVVqOYlQA== X-Received: by 2002:a1c:e444:: with SMTP id b65mr4026580wmh.6.1586340404807; Wed, 08 Apr 2020 03:06:44 -0700 (PDT) Received: from dynamic-enq0kbsbw0smjiux7-pd01.res.v6.highway.a1.net (dynamic-enq0kbsbw0smjiux7-pd01.res.v6.highway.a1.net. [2001:871:60:80ed:2a2a:2d67:d950:380b]) by smtp.gmail.com with ESMTPSA id s9sm5921802wmc.2.2020.04.08.03.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 03:06:44 -0700 (PDT) Message-ID: <98e38782369def5f1fb865533ab22d828b442d78.camel@cybertec.at> Subject: Re: How to get more than 2^32 BLOBs From: Laurenz Albe To: Donato Marrazzo , pgsql-admin@lists.postgresql.org Date: Wed, 08 Apr 2020 12:06:43 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 2020-04-08 at 11:15 +0200, Donato Marrazzo wrote: > according this page [1], large object are limited to the OID range of 2^32 (since it's a 4 bytes number). > I'm working on a use case were there are many tables with blobs (on average not so large 32KB). > I foresee that in 2-3 years time frame, the limit of overall blobs will be breached: more than 2^32 blobs. > > - Is there a way to change the OID limit? > - Should we switch to a bytea implementation? > - Are there any drawback of bytea except the maximum space? Don't use large objects. They are only useful if 1) you have files larger than 1GB or 2) you need to stream writes There are no such limitations if you use the "bytea" data type, and it is much simpler to handle at the same time. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com