Re: [HACKERS] pg_arch.c call to sleep()

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] pg_arch.c call to sleep()
Дата
Msg-id 419CD55C.7010802@dunslane.net
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_arch.c call to sleep()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] pg_arch.c call to sleep()
Список pgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>
>
>>I take this as confirmation that calling pg_usleep is the Right Thing (tm).
>>Here's the patch.
>>
>>
>
>Applied.
>
>
>
>

Darnit, I caught one and not the other. Here's a oneline fix.

cheers

andrew
Index: src/backend/postmaster/pgarch.c
===================================================================
RCS file: /home/cvsmirror/pgsql/src/backend/postmaster/pgarch.c,v
retrieving revision 1.11
diff -c -r1.11 pgarch.c
*** src/backend/postmaster/pgarch.c    17 Nov 2004 17:50:20 -0000    1.11
--- src/backend/postmaster/pgarch.c    18 Nov 2004 16:57:10 -0000
***************
*** 392,398 ****
                                      xlog)));
                      return;        /* give up archiving for now */
                  }
!                 sleep(1);        /* wait a bit before retrying */
              }
          }
      }
--- 392,398 ----
                                      xlog)));
                      return;        /* give up archiving for now */
                  }
!                 pg_usleep(1000000L);    /* wait 1 sec before retrying */
              }
          }
      }

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

Предыдущее
От: "Zeugswetter Andreas DAZ SD"
Дата:
Сообщение: Re: [HACKERS] pg_resetxlog options
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pg_arch.c call to sleep()