RE: Timeout parameters

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Cc: "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "AYahorau(at)ibagroup(dot)eu" <AYahorau(at)ibagroup(dot)eu>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "MikalaiKeida(at)ibagroup(dot)eu" <MikalaiKeida(at)ibagroup(dot)eu>
Subject: RE: Timeout parameters
Date: 2019-03-14 06:06:06
Message-ID: alpine.DEB.2.21.1903140652540.4059@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>> HI think that your patch is responsible for the added option at least.
>>
>> I agree that the underlying issue that other parameters should probably
>> also be reused, which would be a bug fix, does not belong to this thread.
>
> This doesn't seem to be a bug. \connect just establishes a new connection, not reusing the previous settings for most connection parameters. As the examples in the following manual page show, the user needs to specify necessary connection parameters.
>
> https://www.postgresql.org/docs/devel/app-psql.html
>
> => \c service=foo
> => \c "host=localhost port=5432 dbname=mydb connect_timeout=10 sslmode=disable"
>
>
> But I'm afraid the description of \connect may not be clear enough about
> connection parameters, and that may cause users to expect the reuse of
> all connection parameter settings.

I think that the typical use-case of \c is to connect to another database
on the same host, at least that what I do pretty often. The natural
expectation is that the same "other" connection parameters are used,
otherwise it does not make much sense, and there is already a whole logic
of reusing the previous settings in psql, at least wrt describing the
target (host, port, user…).

> Anyway, I think this would be an improvement for psql's documentation or
> new feature for psql. What do you think?

I think that we should fix the behavior rather than document the current
weirdness. I do not think that we should introduce more weirdness.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-03-14 06:17:29 Re: WIP: Avoid creation of the free space map for small tables
Previous Message Kyotaro HORIGUCHI 2019-03-14 06:03:28 Re: Fix handling of unlogged tables in FOR ALL TABLES publications