Re: pg_basebackup and replication slots - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_basebackup and replication slots
Date
Msg-id 5593FAAE.5020706@gmx.net
Whole thread Raw
In response to Re: pg_basebackup and replication slots  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: pg_basebackup and replication slots
List pgsql-hackers
On 7/1/15 8:37 AM, Michael Paquier wrote:
> 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.

Sure, makes sense.




pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Support for N synchronous standby servers - take 2
Next
From: Amit Kapila
Date:
Subject: Re: drop/truncate table sucks for large values of shared buffers