Re: pg_basebackup and replication slots

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_basebackup and replication slots
Date: 2015-07-01 12:37:55
Message-ID: CAB7nPqSu0xJyaEqZSRrbxf9O=RAjKHSbD62qMf7rLm4weaO99A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 1, 2015 at 10:33 AM, Peter Eisentraut wrote:
> (If you're looking at the patch and wondering why there is no code to
> actually do anything with the replication slot, that's because the code
> that does the WAL streaming is already aware of replication slots
> because of the pg_receivexlog functionality that it also serves. So all
> that needs to be done is set replication_slot.)

This is cool to see this patch taking shape.

+ my ($stdout, $stderr);
+ run [ 'psql', '-X', '-A', '-t', '-q', '-d', $dbname, '-f', '-' ],
'<', \$sql, '>', \$stdout, '2>', \$stderr or die;
+ chomp $stdout;
+ return $stdout;

Could it be possible to chomp and return $stderr as well here? It
seems useful to me to perform sanity checks after calling psql.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-07-01 12:53:08 Re: Expending the use of xlog_internal.h's macros
Previous Message Fujii Masao 2015-07-01 12:31:52 Re: pg_rewind failure by file deletion in source server