pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16353: pg_isready timeout is ignored
2+ messages / 2 participants
[nested] [flat]

* BUG #16353: pg_isready timeout is ignored
@ 2020-04-09 06:00 PG Bug reporting form <noreply@postgresql.org>
  2020-04-09 07:45 ` Re: BUG #16353: pg_isready timeout is ignored Hamid Akhtar <hamid.akhtar@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-04-09 06:00 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: vonproteus+postgresql.org@gmail.com

The following bug has been logged on the website:

Bug reference:      16353
Logged by:          vonProteus
Email address:      vonproteus+postgresql.org@gmail.com
PostgreSQL version: 11.7
Operating system:   docker postgres:11-alpine (x64)
Description:        

hi
i have problem with pg_isready and time out 
it look like it is ignored
this is my setup

$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p
3333:5432 --rm -d postgres:11-alpine
4765f8dc49374044d551b3cdb0ce5284905ee1c01bf6a81b2cddf30ab6798bc8

$ time docker run --rm  postgres:11-alpine pg_isready -t 120 -h
10.110.12.163 -p 3333
10.110.12.163:3333 - accepting connections

real    0m0.781s
user    0m0.000s
sys     0m0.031s

$ docker stop some-postgres
some-postgres

$ time docker run --rm  postgres:11-alpine pg_isready -t 120 -h
10.110.12.163 -p 3333
10.110.12.163:3333 - no response

real    0m2.722s
user    0m0.000s
sys     0m0.031s

i would expect that second call would exit after 120s
i run this on windows



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16353: pg_isready timeout is ignored
  2020-04-09 06:00 BUG #16353: pg_isready timeout is ignored PG Bug reporting form <noreply@postgresql.org>
@ 2020-04-09 07:45 ` Hamid Akhtar <hamid.akhtar@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Hamid Akhtar @ 2020-04-09 07:45 UTC (permalink / raw)
  To: vonproteus+postgresql.org@gmail.com; pgsql-bugs@lists.postgresql.org

For pg_isready attempts to make a connection with the sever. If a
connection is not successful and we didn't receive any error response from
the server, it is a fair assumption to make that server is not running. In
this case, it makes perfect sense to not honour the timeout value and
return immediately.

So, this is actually not a bug but rather an expected behaviour.

On Thu, Apr 9, 2020 at 11:18 AM PG Bug reporting form <
noreply@postgresql.org> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      16353
> Logged by:          vonProteus
> Email address:      vonproteus+postgresql.org@gmail.com
> PostgreSQL version: 11.7
> Operating system:   docker postgres:11-alpine (x64)
> Description:
>
> hi
> i have problem with pg_isready and time out
> it look like it is ignored
> this is my setup
>
> $ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p
> 3333:5432 --rm -d postgres:11-alpine
> 4765f8dc49374044d551b3cdb0ce5284905ee1c01bf6a81b2cddf30ab6798bc8
>
> $ time docker run --rm  postgres:11-alpine pg_isready -t 120 -h
> 10.110.12.163 -p 3333
> 10.110.12.163:3333 - accepting connections
>
> real    0m0.781s
> user    0m0.000s
> sys     0m0.031s
>
> $ docker stop some-postgres
> some-postgres
>
> $ time docker run --rm  postgres:11-alpine pg_isready -t 120 -h
> 10.110.12.163 -p 3333
> 10.110.12.163:3333 - no response
>
> real    0m2.722s
> user    0m0.000s
> sys     0m0.031s
>
> i would expect that second call would exit after 120s
> i run this on windows
>
>

-- 
Highgo Software (Canada/China/Pakistan)
URL : www.highgo.ca
ADDR: 10318 WHALLEY BLVD, Surrey, BC
CELL:+923335449950  EMAIL: mailto:hamid.akhtar@highgo.ca
SKYPE: engineeredvirus

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-04-09 07:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 06:00 BUG #16353: pg_isready timeout is ignored PG Bug reporting form <noreply@postgresql.org>
2020-04-09 07:45 ` Hamid Akhtar <hamid.akhtar@gmail.com>

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