Small LO_BUFSIZE slows down lo_import and lo_export in libpq

From: Дмитрий Питаков <dvpitakov(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Small LO_BUFSIZE slows down lo_import and lo_export in libpq
Date: 2024-06-21 08:46:36
Message-ID: CAN9_0q6SxObnbEdwwmDON_YqhtH2C75z32wKf1wYWh4cKfbo6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In libpq, in the code of the lo_import function, for each piece of a file
of 8KB in size, lo_write is called, which greatly slows down the work of
lo_import because lo_write sends a request and waits for a response. The
size of 8KB is specified in define LO_BUFSIZE which changed from 1KB to 8KB
24 years ago.
Why not increase the buffer size?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-06-21 08:53:55 Re: minor doc issue in 9.16.2.1.1. Boolean Predicate Check Expressions
Previous Message Andrey M. Borodin 2024-06-21 08:44:06 Re: Allow non-superuser to cancel superuser tasks.