Hi, On Tue, Sep 19, 2017 at 5:12 PM, Michael Paquier <michael.paqu...@gmail.com> wrote:
> > >>@@ -163,22 +150,16 @@ lo_read(int fd, char *buf, int len) > >> .... > >> + if ((lobj->flags & IFS_RDLOCK) == 0) > >>+ ereport(ERROR, > >>+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), > >>+ errmsg("large object descriptor %d was not opened for reading", > >>+ fd))); > > > > Do we ever reach this error? Because per my understanding > > This error can be reached, and it is part of the regression tests. One > query which passed previously is now failing: > +SELECT loread(lo_open(1001, x'20000'::int), 32); -- fail, wrong mode > +ERROR: large object descriptor 0 was not opened for reading Yes, I did realize on further reading the patch and what led to the confusion is that in the 3rd patch , updated documentation(copied below) still says that reading from a descriptor opened with INV_WRITE is possible. I think we need some correction here to reflect the modified code behavior. + or other transactions. Reading from a descriptor opened with + <symbol>INV_WRITE</symbol> or <symbol>INV_READ</> <literal>|</> + <symbol>INV_WRITE</symbol> returns data that reflects all writes of + other committed transactions as well as writes of the current + transaction. Thanks & Regards, Vaishnavi, Fujitsu Australia.