From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Widen COPY FROM's current-line-number counter from 32 to 64 bits |
Date: | 2018-05-22 17:33:11 |
Message-ID: | E1fLB9r-0002ij-EZ@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Widen COPY FROM's current-line-number counter from 32 to 64 bits.
Because the code for the HEADER option skips a line when this counter
is zero, a very long COPY FROM WITH HEADER operation would drop a line
every 2^32 lines. A lesser but still unfortunate problem is that errors
would show a wrong input line number for errors occurring beyond the
2^31'st input line. While such large input streams seemed impractical
when this code was first written, they're not any more. Widening the
counter (and some associated variables) to uint64 should be enough to
prevent problems for the foreseeable future.
David Rowley
Discussion: https://postgr.es/m/CAKJS1f88yh-6wwEfO6QLEEvH3BEugOq2QX1TOja0vCauoynmOQ@mail.gmail.com
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7df2778279ab2cc36c14252ef1b7da8c2c9adaaa
Modified Files
--------------
src/backend/commands/copy.c | 38 +++++++++++++++++++++-----------------
1 file changed, 21 insertions(+), 17 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | pgsql | 2018-05-22 22:31:10 | pgsql: Tag refs/tags/REL_11_BETA1 was created |
Previous Message | Heikki Linnakangas | 2018-05-22 10:26:18 | pgsql: Add missing files to src/backend/lib/README. |