Content-Length: 278318 | pFad | http://github.com/postgrespro/postgres/commit/f0bfc02001c5f9a78fb3a5f72b97ffb35d526ec6

E0 Remove unnecessary lo_lseek call in lo_open. Apparently there was once · postgrespro/postgres@f0bfc02 · GitHub
Skip to content

Commit f0bfc02

Browse files
committed
Remove unnecessary lo_lseek call in lo_open. Apparently there was once
a need for it back in the neolithic era, but it's certainly dead code in any PG release we would recognize as such. Since it forces an additional network round trip to the backend, getting rid of it should provide some small performance improvement for large-object-using clients.
1 parent 56aa84a commit f0bfc02

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/interfaces/libpq/fe-lobj.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.54 2005/10/15 02:49:48 momjian Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.55 2006/03/02 21:56:14 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -76,11 +76,6 @@ lo_open(PGconn *conn, Oid lobjId, int mode)
7676
if (PQresultStatus(res) == PGRES_COMMAND_OK)
7777
{
7878
PQclear(res);
79-
80-
/* have to do this to reset offset in shared fd cache */
81-
/* but only if fd is valid */
82-
if (fd >= 0 && lo_lseek(conn, fd, 0L, SEEK_SET) < 0)
83-
return -1;
8479
return fd;
8580
}
8681
else

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f0bfc02001c5f9a78fb3a5f72b97ffb35d526ec6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy