pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <amit.kapila@huawei.com>
To: 'Heikki Linnakangas' <hlinnakangas@vmware.com>
To: 'Boszormenyi Zoltan' <zb@cybertec.at>
Cc: 'Hari Babu' <haribabu.kommi@huawei.com>
Cc: 'Fujii Masao' <masao.fujii@gmail.com>
Cc: pgsql-hackers@postgresql.org
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: Fri, 18 Jan 2013 12:20:58 +0530
Message-ID: <03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com> (raw)
In-Reply-To: <50F6819A.8020000@vmware.com>
References: <E1TBlX1-0003OA-SB@wrigleys.postgresql.org>
	<506972B9.6060104@vmware.com>
	<6C0B27F7206C9E4CA54AE035729E9C38285358F7@szxeml509-mbs>
	<506AA530.30106@vmware.com>
	<6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs>
	<507597E2.8090701@vmware.com>
	<5076DD38.8020804@vmware.com>
	<CAHGQGwHyMwP8YqmcDynrsGbOax=dL7HmxAnZ68Azr36_7wJ0WQ@mail.gmail.com>
	<507BE1AD.2060709@vmware.com>
	<507e9adc.43db440a.5351.fffff4d0SMTPIN_ADDED@mx.google.com>
	<CAHGQGwHcYME6VdGwwfOrbA27A5ju+MyL4WwaUDK_tPtZ2_uNoQ@mail.gmail.com>
	<6C0B27F7206C9E4CA54AE035729E9C382853BBED@szxeml509-mbs>
	<509B6E66.9070408@vmware.com>
	<CAHGQGwGdYJ1tJDHH+FURgaJhRR1kmpvKatpBdmgLsk7ZMhYKPA@mail.gmail.com>
	<509c9cd1.494f420a.3fc7.4362SMTPIN_ADDED@mx.google.com>
	<CAHGQGwHxvOUPrtXDBMtDGHc7+7dEsF7G4GmfN2_CTPKeQXqe_Q@mail.gmail.com>
	<6C0B27F7206C9E4CA54AE035729E9C38285499FA@szxeml509-mbx>
	<50E31370.5030405@cybertec.at>
	<007701cdea79$0cf35b30$26da1190$@kommi@huawei.co m>
	<50EADA46.60802@cybertec.at>
	<50F6819A.8020000@vmwar e.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Wednesday, January 16, 2013 4:02 PM Heikki Linnakangas wrote:
> 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.

True, but IMO, if somebody want to take basebackup, he should do that when
the server is not loaded. 
 
> 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.

I think currently user has no way to specify TCP keepalive settings from
pg_basebackup, please let me know if there is any such existing way?

I think specifying TCP settings is very cumbersome for most users, that's
the reason most standard interfaces (ODBC/JDBC) have such application level
timeout mechanism.

By implementing in FE/BE protocol (do you mean to say that make such
non-blocking behavior inside Libpq or something else), it might be generic
and can be used for others as well but it might need few interface changes.

IMHO if by having such less impact changes for pg_basebackup, it makes
pg_basebackup network sensitive, the current approach can also be
considered.


With Regards,
Amit Kapila.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (11+ messages)  latest in thread

Message-ID: <03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com>
Permalink:  ../03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com/
Also on:    postgresql.org/message-id/03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: amit.kapila@huawei.com, hlinnakangas@vmware.com, zb@cybertec.at, haribabu.kommi@huawei.com, masao.fujii@gmail.com, pgsql-hackers@postgresql.org
  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
  In-Reply-To: <03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com>
  References: <E1TBlX1-0003OA-SB@wrigleys.postgresql.org> <506972B9.6060104@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C38285358F7@szxeml509-mbs> <506AA530.30106@vmware.com> <6C0B27F7206C9E4CA54AE035729E9C382853645A@szxeml509-mbs> <507597E2.8090701@vmware.com> <5076DD38.8020804@vmware.com> <CAHGQGwHyMwP8YqmcDynrsGbOax=dL7HmxAnZ68Azr36_7wJ0WQ@mail.gmail.com> <507BE1AD.2060709@vmware.com> <507e9adc.43db440a.5351.fffff4d0SMTPIN_ADDED@mx.google.com> <CAHGQGwHcYME6VdGwwfOrbA27A5ju+MyL4WwaUDK_tPtZ2_uNoQ@mail.gmail.com> <6C0B27F7206C9E4CA54AE035729E9C382853BBED@szxeml509-mbs> <509B6E66.9070408@vmware.com> <CAHGQGwGdYJ1tJDHH+FURgaJhRR1kmpvKatpBdmgLsk7ZMhYKPA@mail.gmail.com> <509c9cd1.494f420a.3fc7.4362SMTPIN_ADDED@mx.google.com> <CAHGQGwHxvOUPrtXDBMtDGHc7+7dEsF7G4GmfN2_CTPKeQXqe_Q@mail.gmail.com> <6C0B27F7206C9E4CA54AE035729E9C38285499FA@szxeml509-mbx> <50E31370.5030405@cybertec.at> <50EADA46.60802@cybertec.at> <03b701cdf548$2cfd7170$86f85450$@kapila@huawei.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox