pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin <zzzzz.graf@gmail.com>
Cc: Daniel Verite <daniel@manitou-mail.org>
Cc: shalini@saralweb.com
Cc: Rene Romero Benavides <rene.romero.b@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Tuple concurrency issue in large objects
Date: Wed, 18 Dec 2019 12:12:07 -0500
Message-ID: <7594.1576689127@sss.pgh.pa.us> (raw)
In-Reply-To: <CALL-XeMFp2xeNKsqvDFdJPdUFDMXEGUw2WS_1JDsAYOesFagQw@mail.gmail.com>
References: <0874ff74-7ffc-4a1d-ba26-1a617bb34c59@email.android.com>
	<70757632-58a5-4bf1-a4b8-af2ed5a4fa9a@manitou-mail.org>
	<CALL-XeOqXXd30e6Yo5_7ZURxtoMLn6SWVOA=U9SqoL1SDywB-A@mail.gmail.com>
	<5126.1576685560@sss.pgh.pa.us>
	<CALL-XeMFp2xeNKsqvDFdJPdUFDMXEGUw2WS_1JDsAYOesFagQw@mail.gmail.com>

Justin <zzzzz.graf@gmail.com> writes:
> I now see what is causing this specific issue...
> The update and row versions is happening on 2kb chunk at a time,  That's
> going to make tracking what other clients are doing a difficult task.

Yeah, it's somewhat unfortunate that the chunkiness of the underlying
data storage becomes visible to clients if they try to do concurrent
updates of the same large object.  Ideally you'd only get a concurrency
failure if you tried to overwrite the same byte(s) that somebody else
did, but as it stands, modifying nearby bytes might be enough --- or
not, if there's a chunk boundary between.

On the whole, though, it's not clear to me why concurrent updates of
sections of large objects is a good application design.  You probably
ought to rethink how you're storing your data.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <7594.1576689127@sss.pgh.pa.us>
Permalink:  ../7594.1576689127@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7594.1576689127@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, zzzzz.graf@gmail.com, daniel@manitou-mail.org, shalini@saralweb.com, rene.romero.b@gmail.com
  Subject: Re: Tuple concurrency issue in large objects
  In-Reply-To: <7594.1576689127@sss.pgh.pa.us>
  References: <0874ff74-7ffc-4a1d-ba26-1a617bb34c59@email.android.com> <70757632-58a5-4bf1-a4b8-af2ed5a4fa9a@manitou-mail.org> <CALL-XeOqXXd30e6Yo5_7ZURxtoMLn6SWVOA=U9SqoL1SDywB-A@mail.gmail.com> <5126.1576685560@sss.pgh.pa.us> <CALL-XeMFp2xeNKsqvDFdJPdUFDMXEGUw2WS_1JDsAYOesFagQw@mail.gmail.com> <7594.1576689127@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox