pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Mismatch for connection key/value pair  between documentation  and code?
3+ messages / 3 participants
[nested] [flat]

* Mismatch for connection key/value pair  between documentation  and code?
@ 2024-07-16 04:54 PG Doc comments form <noreply@postgresql.org>
  2024-07-16 14:20 ` Re: Mismatch for connection key/value pair between documentation and code? David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2024-07-16 04:54 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: joe.zhou@dualhelios.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/libpq-connect.html
Description:

Hi PostgreSQL documentation team, 

I have a confusion regarding parameters used   in documentation vs. that in
the code. Please clarify if I misunderstand something there or.

Thanks,
Joe


For the following document regarding connect string, it is not aligned with
the code.
https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING

e.g. Timeout for connection

In the above document,it states the following:

"connect_timeout 
Maximum time to wait while connecting, in seconds (write as a decimal
integer, e.g., 10). Zero, negative, or not specified means wait
indefinitely. The minimum allowed timeout is 2 seconds, therefore a value of
1 is interpreted as 2. This timeout applies separately to each host name or
IP address. For example, if you specify two hosts and connect_timeout is 5,
each host will time out if no connection is made within 5 seconds, so the
total time spent waiting for a connection might be up to 10 seconds."


However in the code:
https://github.com/npgsql/npgsql/blob/docs/src/Npgsql/NpgsqlConnectionStringBuilder.cs,
starting L789  to L812 (latest version when I raise this ticket).

The name is Timeout instead of connect_timeout, and there's no logic
regarding 2 second check


    /// <summary>
    /// The time to wait (in seconds) while trying to establish a connection
before terminating the attempt and generating an error.
    /// Defaults to 15 seconds.
    /// </summary>
    [Category("Timeouts")]
    [Description("The time to wait (in seconds) while trying to establish a
connection before terminating the attempt and generating an error.")]
    [DisplayName("Timeout")]
    [NpgsqlConnectionStringProperty]
    [DefaultValue(DefaultTimeout)]
    public int Timeout
    {
        get => _timeout;
        set
        {
            if (value < 0 || value > NpgsqlConnection.TimeoutLimit)
                throw new ArgumentOutOfRangeException(nameof(value), value,
"Timeout must be between 0 and " + NpgsqlConnection.TimeoutLimit);

            _timeout = value;
            SetValue(nameof(Timeout), value);
        }
    }
    int _timeout;

    internal const int DefaultTimeout = 15;


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

* Re: Mismatch for connection key/value pair between documentation and code?
  2024-07-16 04:54 Mismatch for connection key/value pair  between documentation  and code? PG Doc comments form <noreply@postgresql.org>
@ 2024-07-16 14:20 ` David G. Johnston <david.g.johnston@gmail.com>
  2024-07-17 01:20   ` Re: Re: Mismatch for connection key/value pair between documentation and code? =?GB2312?B?1tzWvsfa?= <joe.zhou@dualhelios.com>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2024-07-16 14:20 UTC (permalink / raw)
  To: joe.zhou@dualhelios.com <joe.zhou@dualhelios.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

On Monday, July 15, 2024, PG Doc comments form <noreply@postgresql.org>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/16/libpq-connect.html
> Description:
>
>
> For the following document regarding connect string, it is not aligned with
> the code.
> https://www.postgresql.org/docs/current/libpq-connect.
> html#LIBPQ-CONNSTRING
>
> e.g. Timeout for connection
>
> "connect_timeout
> Maximum time to wait while connecting, in seconds (write as a decimal
> integer, e.g., 10).




> However in the code:
> https://github.com/npgsql/npgsql/blob/docs/src/Npgsql/
> NpgsqlConnectionStringBuilder.cs,
> starting L789  to L812 (latest version when I raise this ticket).



>
> The name is Timeout instead of connect_timeout, and there's no logic
> regarding 2 second check
>
>
Probably this third-party module is not using the libpq API.  Or at minimum
not that aspect of the API.

David J.

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

* Re: Re: Mismatch for connection key/value pair between documentation and code?
  2024-07-16 04:54 Mismatch for connection key/value pair  between documentation  and code? PG Doc comments form <noreply@postgresql.org>
  2024-07-16 14:20 ` Re: Mismatch for connection key/value pair between documentation and code? David G. Johnston <david.g.johnston@gmail.com>
@ 2024-07-17 01:20   ` =?GB2312?B?1tzWvsfa?= <joe.zhou@dualhelios.com>
  0 siblings, 0 replies; 3+ messages in thread

From: 周志勤 @ 2024-07-17 01:20 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>

Hi David,

Thanks for your clarification.

Best regards,
Joe 



joe.zhou@dualhelios.com
 
From: David G. Johnston
Date: 2024-07-16 22:20
To: joe.zhou@dualhelios.com; pgsql-docs@lists.postgresql.org
Subject: Re: Mismatch for connection key/value pair between documentation and code?
On Monday, July 15, 2024, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/libpq-connect.html
Description:


For the following document regarding connect string, it is not aligned with
the code.
https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING

e.g. Timeout for connection

"connect_timeout 
Maximum time to wait while connecting, in seconds (write as a decimal
integer, e.g., 10).

 
However in the code:
https://github.com/npgsql/npgsql/blob/docs/src/Npgsql/NpgsqlConnectionStringBuilder.cs,
starting L789  to L812 (latest version when I raise this ticket).
 

The name is Timeout instead of connect_timeout, and there's no logic
regarding 2 second check


Probably this third-party module is not using the libpq API.  Or at minimum not that aspect of the API.

David J.



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


end of thread, other threads:[~2024-07-17 01:20 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-07-16 04:54 Mismatch for connection key/value pair  between documentation  and code? PG Doc comments form <noreply@postgresql.org>
2024-07-16 14:20 ` Re: Mismatch for connection key/value pair between documentation and code? David G. Johnston <david.g.johnston@gmail.com>
2024-07-17 01:20   ` Re: Re: Mismatch for connection key/value pair between documentation and code? =?GB2312?B?1tzWvsfa?= <joe.zhou@dualhelios.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