pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify SortTocFromFile() by removing fixed buffer-size limit.
Date: Tue, 22 Sep 2020 20:03:41 +0000
Message-ID: <E1kKoVp-0001Lh-VB@gemulon.postgresql.org> (raw)

Simplify SortTocFromFile() by removing fixed buffer-size limit.

pg_restore previously coped with overlength TOC-file lines using some
complicated logic to ignore additional bufferloads.  While this isn't
wrong, since we don't expect that the interesting part of a line would
run to more than a dozen or so bytes, it's more complex than it needs
to be.  Use a StringInfo instead of a fixed-size buffer so that we can
process long lines as single entities and thus not need the extra
logic.

Daniel Gustafsson

Discussion: https://postgr.es/m/48A4FA71-524E-41B9-953A-FD04EF36E2E7@yesql.se

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e3c19462da930d1d018caa3daabca00159b4b18

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 41 ++++++++++++++----------------------
1 file changed, 16 insertions(+), 25 deletions(-)



Message-ID: <E1kKoVp-0001Lh-VB@gemulon.postgresql.org>
Permalink:  ../E1kKoVp-0001Lh-VB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kKoVp-0001Lh-VB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Simplify SortTocFromFile() by removing fixed buffer-size limit.
  In-Reply-To: <E1kKoVp-0001Lh-VB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox