Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihbwS-0003Z2-Rj for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2019 16:12:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihbwQ-0001Pj-RT for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2019 16:12:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihbwQ-0001Pc-Ha for pgsql-general@lists.postgresql.org; Wed, 18 Dec 2019 16:12:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ihbwO-0001eo-57 for pgsql-general@postgresql.org; Wed, 18 Dec 2019 16:12:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xBIGCelY005127; Wed, 18 Dec 2019 11:12:40 -0500 From: Tom Lane To: Justin cc: Daniel Verite , shalini@saralweb.com, Rene Romero Benavides , Postgres General Subject: Re: Tuple concurrency issue in large objects In-reply-to: References: <0874ff74-7ffc-4a1d-ba26-1a617bb34c59@email.android.com> <70757632-58a5-4bf1-a4b8-af2ed5a4fa9a@manitou-mail.org> Comments: In-reply-to Justin message dated "Wed, 18 Dec 2019 10:37:08 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5125.1576685560.1@sss.pgh.pa.us> Date: Wed, 18 Dec 2019 11:12:40 -0500 Message-ID: <5126.1576685560@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin writes: > I have a question reading through this email chain. Does Large Objects > table using these functions work like normal MVCC where there can be two > versions of a large object in pg_largeobject . Yes, otherwise you could never roll back a transaction that'd modified a large object. > My gut says no as > moving/copying potentially 4 TB of data would kill any IO. Well, it's done on a per-chunk basis (normally about 2K per chunk), so you won't do that much I/O unless you're changing all of a 4TB object. regards, tom lane