Обсуждение: pg_basebackup streaming issue from standby

Поиск
Список
Период
Сортировка

pg_basebackup streaming issue from standby

От
Thom Brown
Дата:
Hi,

I've just tried using pg_basebackup to take a backup of a standby with
"-x stream" but it never finishes.  This is what I get:

thom@swift:~/Development$ pg_basebackup -p 5489 -D data3 -x stream -Pv
xlog start point: 0/6000020
pg_basebackup: starting background WAL receiver
78020/78020 kB (100%), 1/1 tablespace
xlog end point: 0/6F819F8
pg_basebackup: waiting for background process to finish streaming...


pg_stat_replication on the standby looks like this:

thom@test=# select * from pg_stat_replication ;
-[ RECORD 1 ]----+------------------------------
pid              | 29161
usesysid         | 10
usename          | thom
application_name | pg_basebackup
client_addr      |
client_hostname  |
client_port      | -1
backend_start    | 2012-03-08 01:33:32.799491+00
state            | startup
sent_location    | 0/0
write_location   |
flush_location   |
replay_location  |
sync_priority    | 0
sync_state       | async
-[ RECORD 2 ]----+------------------------------
pid              | 29162
usesysid         | 10
usename          | thom
application_name | pg_basebackup
client_addr      |
client_hostname  |
client_port      | -1
backend_start    | 2012-03-08 01:33:32.921461+00
state            | streaming
sent_location    | 0/6F819F8
write_location   |
flush_location   |
replay_location  |
sync_priority    | 0
sync_state       | async


It gets stuck here and never finishes.  This also prevents the standby
from shutting down unless pg_basebackup is terminated.  I've attached
the log from the standby in case it's of any use (with
log_min_messages set to debug5).

This is using an unpatched copy of latest Git master.

--
Thom

Вложения

Re: pg_basebackup streaming issue from standby

От
Fujii Masao
Дата:
On Thu, Mar 8, 2012 at 10:36 AM, Thom Brown <thom@linux.com> wrote:
> I've just tried using pg_basebackup to take a backup of a standby with
> "-x stream" but it never finishes.

Thanks for the report! This is the same problem as I reported before.
We are now discussing how to fix that.
http://archives.postgresql.org/message-id/CAHGQGwFim5F61AfdLQH4PvARPr0Ace2=9QH62khYGraWY4E5TQ@mail.gmail.com

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


Re: pg_basebackup streaming issue from standby

От
Magnus Hagander
Дата:
On Thu, Mar 8, 2012 at 02:45, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Thu, Mar 8, 2012 at 10:36 AM, Thom Brown <thom@linux.com> wrote:
>> I've just tried using pg_basebackup to take a backup of a standby with
>> "-x stream" but it never finishes.
>
> Thanks for the report! This is the same problem as I reported before.
> We are now discussing how to fix that.
> http://archives.postgresql.org/message-id/CAHGQGwFim5F61AfdLQH4PvARPr0Ace2=9QH62khYGraWY4E5TQ@mail.gmail.com

Yeah, it sounds like just that issue. And a good kick mmy way that I
need to get back on that thread :-)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: pg_basebackup streaming issue from standby

От
Thom Brown
Дата:
On 8 March 2012 01:45, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Thu, Mar 8, 2012 at 10:36 AM, Thom Brown <thom@linux.com> wrote:
>> I've just tried using pg_basebackup to take a backup of a standby with
>> "-x stream" but it never finishes.
>
> Thanks for the report! This is the same problem as I reported before.
> We are now discussing how to fix that.
> http://archives.postgresql.org/message-id/CAHGQGwFim5F61AfdLQH4PvARPr0Ace2=9QH62khYGraWY4E5TQ@mail.gmail.com

I hadn't read your previous post before, so apologies for the noise.
I did note from your post that the base backup can be finished by
generating enough data on the source, which worked for me too.

-- 
Thom