Shouldn't large objects be MVCC-aware?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Shouldn't large objects be MVCC-aware?
Date: 2002-05-21 22:56:59
Message-ID: 19298.1022021819@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I notice that the large-object operations in pg_largeobject.c and
inv_api.c all use SnapshotNow to access large-object tuples. This
means they are not really MVCC compliant. For example, I could be
reading a large object that someone else is writing; if he commits
mid-read, then I will see some old data and some updated data.
This seems wrong.

In particular, pg_dump cannot promise to dump a consistent snapshot
of large objects, because what it reads will be read under SnapshotNow.

I suggest that large object tuples are user data and so should be
read using the QuerySnapshot established at start of transaction.

Comments anyone? Is it possible that changing this will break any
existing applications that depend on the current behavior?

regards, tom lane

Browse pgsql-hackers by date

  From Date Subject
Next Message Dann Corbit 2002-05-21 23:30:29 Re: Is 7.3 a good time to increase NAMEDATALEN ?
Previous Message Lamar Owen 2002-05-21 22:47:05 Re: Redhat 7.3 time manipulation bug