|From:||Heikki Linnakangas <hlinnaka(at)iki(dot)fi>|
|Subject:||Removing support for COPY FROM STDIN in protocol version 2|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
The server still supports the old protocol version 2. Protocol version 3
was introduced in PostgreSQL 7.4, so there shouldn't be many clients
around anymore that don't support it.
COPY FROM STDIN is particularly problematic with the old protocol,
because the end-of-copy can only be detected by the \. marker. So the
server has to read the input one byte at a time, and check for \. as it
goes. At , I'm working on a patch to change the way the encoding
conversion is performed in COPY FROM, so that we convert the data in
larger chunks, before scanning the input for line boundaries. We can't
do that safely in the old protocol.
I propose that we remove server support for COPY FROM STDIN with
protocol version 2, per attached patch. Even if we could still support
it, it would be a very rarely used and tested codepath, prone to bugs.
Perhaps we could remove support for the old protocol altogether, but I'm
not proposing that we go that far just yet.
|Next Message||Tom Lane||2021-02-03 16:00:52||Re: Removing support for COPY FROM STDIN in protocol version 2|
|Previous Message||Stephen Frost||2021-02-03 15:33:57||Re: Key management with tests|