Re: pq_setkeepalives* functions

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pq_setkeepalives* functions
Дата
Msg-id 201003131640.o2DGelf27362@momjian.us
обсуждение исходный текст
Ответ на Re: pq_setkeepalives* functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pq_setkeepalives* functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Jaime Casanova wrote:
> >> but in pq_setkeepalivesinterval() the #DEFINE is after the
> >> conditional, doesn't seems to affect anything but for consistency with
> >> the other two :)
>
> > Thanks, applied.
>
> This makes the function *not* like the other two, rather than
> improving consistency.

Well, it makes it like some of the existing functions, but not like
others.  This applied patch fixes them all.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do
Index: src/backend/libpq/pqcomm.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v
retrieving revision 1.206
diff -c -c -r1.206 pqcomm.c
*** src/backend/libpq/pqcomm.c    13 Mar 2010 15:35:46 -0000    1.206
--- src/backend/libpq/pqcomm.c    13 Mar 2010 16:38:57 -0000
***************
*** 1346,1355 ****
  int
  pq_setkeepalivesidle(int idle, Port *port)
  {
      if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
          return STATUS_OK;

- #ifdef TCP_KEEPIDLE
      if (idle == port->keepalives_idle)
          return STATUS_OK;

--- 1346,1355 ----
  int
  pq_setkeepalivesidle(int idle, Port *port)
  {
+ #ifdef TCP_KEEPIDLE
      if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
          return STATUS_OK;

      if (idle == port->keepalives_idle)
          return STATUS_OK;

***************
*** 1490,1499 ****
  int
  pq_setkeepalivescount(int count, Port *port)
  {
      if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
          return STATUS_OK;

- #ifdef TCP_KEEPCNT
      if (count == port->keepalives_count)
          return STATUS_OK;

--- 1490,1499 ----
  int
  pq_setkeepalivescount(int count, Port *port)
  {
+ #ifdef TCP_KEEPCNT
      if (port == NULL || IS_AF_UNIX(port->laddr.addr.ss_family))
          return STATUS_OK;

      if (count == port->keepalives_count)
          return STATUS_OK;


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pq_setkeepalives* functions
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Dyamic updates of NEW with pl/pgsql