pgsql: Clean up pg_basebackup libpq usage

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Clean up pg_basebackup libpq usage
Date: 2013-07-15 15:34:02
Message-ID: E1Uykmo-0008SG-Lh@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Clean up pg_basebackup libpq usage

When using libpq, it's generally preferrable to just use the strings
which are in the PQ structures instead of copying them out, so do
that instead in BaseBackup(), eliminating the strcpy()'s used there.

Also, in ReceiveAndUnpackTarFile(), check the string length for the
directory returned by the server for the tablespace path.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/2f397a08de49e28e3430ff7278f4648757dea2a3

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-07-15 16:32:15 pgsql: Regression tests for LOCK TABLE.
Previous Message Robert Haas 2013-07-15 14:52:35 pgsql: vacuumlo: Use a cursor to limit client-side memory usage.