Skip site navigation (1) Skip section navigation (2)

Re: Review of "pg_basebackup and pg_receivexlog to use non-blocking socket communication", was: Re: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
Cc: Hari Babu <haribabu(dot)kommi(at)huawei(dot)com>, 'Fujii Masao' <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, 'Amit kapila' <amit(dot)kapila(at)huawei(dot)com>
Subject: Re: Review of "pg_basebackup and pg_receivexlog to use non-blocking socket communication", was: Re: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown
Date: 2013-01-16 10:31:54
Message-ID: 50F6819A.8020000@vmware.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On 07.01.2013 16:23, Boszormenyi Zoltan wrote:
> Since my other patch against pg_basebackup is now committed,
> this patch doesn't apply cleanly, patch rejects 2 hunks.
> The fixed up patch is attached.

Now that I look at this a high-level perspective, why are we only 
worried about timeouts in the Copy-mode and when connecting? The initial 
checkpoint could take a long time too, and if the server turns into a 
black hole while the checkpoint is running, pg_basebackup will still 
hang. Then again, a short timeout on that phase would be a bad idea, 
because the checkpoint can indeed take a long time.

In streaming replication, the keep-alive messages carry additional 
information, the timestamps and WAL locations, so a keepalive makes 
sense at that level. But otherwise, aren't we just trying to reimplement 
TCP keepalives? TCP keepalives are not perfect, but if we want to have 
an application level timeout, it should be implemented in the FE/BE 
protocol.

I don't think we need to do anything specific to pg_basebackup. The user 
can simply specify TCP keepalive settings in the connection string, like 
with any libpq program.

- Heikki


In response to

Responses

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2013-01-16 11:52:43
Subject: Re: Parallel query execution
Previous:From: Kohei KaiGaiDate: 2013-01-16 09:43:23
Subject: Re: system administration functions with hardcoded superuser checks

pgsql-bugs by date

Next:From: tsunezumiDate: 2013-01-17 11:07:05
Subject: BUG #7814: Rotation of the log is not carried out.
Previous:From: Abhijit Menon-SenDate: 2013-01-16 07:48:17
Subject: Re: Review of "pg_basebackup and pg_receivexlog to use non-blocking socket communication", was: Re: Re: [BUGS] BUG #7534: walreceiver takes long time to detect n/w breakdown

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group