Re: Fix for pg_upgrade status display

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Fix for pg_upgrade status display
Date: 2012-12-06 18:56:45
Message-ID: 20121206185645.GL30893@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, Dec 6, 2012 at 12:43:53PM -0500, Robert Haas wrote:
> On Wed, Dec 5, 2012 at 10:04 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > Pg_upgrade displays file names during copy and database names during
> > dump/restore. Andrew Dunstan identified three bugs:
> >
> > * long file names were being truncated to 60 _leading_ characters, which
> > often do not change for long file names
> >
> > * file names were truncated to 60 characters in log files
> >
> > * carriage returns were being output to log files
> >
> > The attached patch fixes these --- it prints 60 _trailing_ characters to
> > the status display, and full path names without carriage returns to log
> > files.
>
> This might be a dumb question, but why limit it to 60 characters at
> all instead of, say, MAXPGPATH?

It is limited to 60 only for screen display, so the user knows what is
being processed. If the text wraps across several lines, the \r trick
to overwrite the string will not work.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-12-06 18:57:36 Re: Fix for pg_upgrade status display
Previous Message Simon Riggs 2012-12-06 18:42:22 Re: ALTER TABLE ... NOREWRITE option