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

Re: Streaming Replication on win32

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Streaming Replication on win32
Date: 2010-01-21 12:46:17
Message-ID: 4B584C99.8090004@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Heikki Linnakangas wrote:
> Magnus Hagander wrote:
>> 2010/1/17 Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>:
>>> We could replace the blocking PQexec() calls with PQsendQuery(), and use
>>>  the emulated version of select() to wait.
>> Hmm. That would at least theoretically work, but aren't there still
>> places we may end up blocking further down? Or are those ok?
> 
> There's also PQconnect that needs similar treatment (using
> PQconnectStart/Poll()), but that's it.

So here's a patch implementing that for contrib/dblink. Walreceiver
needs the same treatment.

The implementation should be shared between the two, but I'm not sure
how. We can't just put the wrapper functions to a module in
src/backend/port/, because the wrapper functions depend on libpq. Maybe
put them in a new header file as static functions, and include that in
contrib/dblink/dblink.c and src/backend/replication/libpqwalreceiver.c.

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

Attachment: be-win32-interruptible-dblink-1.patch
Description: text/x-diff (5.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-01-21 13:44:15
Subject: Streaming replication and a disk full in primary
Previous:From: Dave PageDate: 2010-01-21 12:37:01
Subject: Re: 8.5 vs. 9.0

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