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 1jM9S9-0002p2-2u for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2020 12:05:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jM9S7-0003OV-Ks for pgsql-admin@arkaria.postgresql.org; Wed, 08 Apr 2020 12:05:07 +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 1jM9S7-0003Ie-73 for pgsql-admin@lists.postgresql.org; Wed, 08 Apr 2020 12:05:07 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jM9S3-0007LC-SL for pgsql-admin@lists.postgresql.org; Wed, 08 Apr 2020 12:05:05 +0000 Received: by mail-wr1-x42c.google.com with SMTP id v5so7475763wrp.12 for ; Wed, 08 Apr 2020 05:05:03 -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:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=FM3nvT6n06FUxCWk+dZS5UWu7BopMASbXjRTUoGlLXM=; b=g/r3T1N7kmywu9yAfhnx1g5U6GVF9nVnUw7VERjzP8+K+xMevzpMYX/X9Sy5oFfI06 WZlQAVyDFdn7wgwKbWhW6MQuV1BDku770kQ9J4lUzBFAOvzd38gpsfd9ENgMojdZw31n skWHT6cF8fjetl9uvWDId5eiESx2xcd8ar7jlIIU4A65W+edxgIBEmB6AT6sbVMRtsDF 6gnrc90CwY0wQ+F9flmlDNZ3l71LTN0cjSxW6+fRlfH5smSDQSsqwgYbk/EEVntTTuH7 ntsbRVtqRgVgAdV8X04oSjcw84L4cXSbzG+cS2dEmcTh/GR2hnzuMGRpZUL1sTGztt+i Fj0w== 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:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=FM3nvT6n06FUxCWk+dZS5UWu7BopMASbXjRTUoGlLXM=; b=Mp7EsOU8bI0+pr69MRdUhzng2k5S9WF97Csyjv/iuospiC0SdO0LQRzYFXy/nalk0H 6vsLBIAWKOpNxH6bkwv2pSGAMCBj0DztPyY692fd8HCoKF/7dc9GDYzr3npCNV0/TZWa JkLT53wpCEuWyQ2TeXRjmtR2I6BvBv6JfSH0NQFV3siR91BwsbF3AREAK85cWaLKSpAd L6MZucD1zSJjB9G/bfQQBzy7gGVIzZZ/9jXpYbCTsQD329IGoHVfiYcBIuLRx/N85rDW YqyvEux2EVU1bVhyMzhpwfp6uG4mjyihzRIGZByvoAYyDIH5VAJV6CqzTVGRk8+Z8doD skAQ== X-Gm-Message-State: AGi0PuY5u3CsNcwa2vw/ncYPStHHDjWVE5foJvHbU234CRj/jC+rYl10 S+XxAstV6Kzc8A4LiGuuqs38/Q== X-Google-Smtp-Source: APiQypK4EXb7MuAChkx7kOZ1X+Tu1sJK0VfuSfzmf6oHYGgfSnOSQctlf40W6KZC9u3f4RG20cOqZw== X-Received: by 2002:a5d:63c5:: with SMTP id c5mr7951776wrw.250.1586347501177; Wed, 08 Apr 2020 05:05:01 -0700 (PDT) Received: from dynamic-emmen78f1665sy0ig-pd01.res.v6.highway.a1.net (dynamic-emmen78f1665sy0ig-pd01.res.v6.highway.a1.net. [2001:871:60:4d6b:518f:b5c9:8037:e718]) by smtp.gmail.com with ESMTPSA id e15sm533370wrt.16.2020.04.08.05.05.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Apr 2020 05:05:00 -0700 (PDT) Message-ID: <50a88c5152f9dee204f1c10a95dd90651585efcb.camel@cybertec.at> Subject: Re: How to get more than 2^32 BLOBs From: Laurenz Albe To: Donato Marrazzo Cc: pgsql-admin@lists.postgresql.org Date: Wed, 08 Apr 2020 14:04:59 +0200 In-Reply-To: References: <98e38782369def5f1fb865533ab22d828b442d78.camel@cybertec.at> 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 12:12 +0200, Donato Marrazzo wrote: > > Il giorno mer 8 apr 2020 alle ore 12:06 Laurenz Albe ha scritto: > > 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. > > Are you aware of any performance drawback? No; in fact, "bytea" performs better. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com