Re: Have pg_basebackup write "dbname" in "primary_conninfo"?
От | vignesh C |
---|---|
Тема | Re: Have pg_basebackup write "dbname" in "primary_conninfo"? |
Дата | |
Msg-id | CALDaNm3ihuJD8UVGRobfd2W3E-AzvYBUpT+MOap+eqadGbos9Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Have pg_basebackup write "dbname" in "primary_conninfo"? (Amit Kapila <amit.kapila16@gmail.com>) |
Список | pgsql-hackers |
On Wed, 20 Mar 2024 at 17:09, Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Tue, Mar 19, 2024 at 5:18 PM Hayato Kuroda (Fujitsu) > <kuroda.hayato@fujitsu.com> wrote: > > > > Thanks for giving comments! > > > > > This behavior makes sense to me. But do we want to handle the case of > > > using environment variables too? > > > > Yeah, v5 does not consider which libpq parameters are specified by environment > > variables. Such a variable should be used when the dbname is not expressly written > > in the connection string. > > Such a path was added in the v6 patch. If the dbname is not determined after > > parsing the connection string, we call PQconndefaults() to get settings from > > environment variables and service files [1], then start to search dbname again. > > > > The functionality implemented by the patch looks good to me. I have > made minor modifications in the function names, error handling, > comments, and doc updates in the attached patch. Let me know what you > think of the attached. While reviewing, I found the following changes could be done: a) we can add one test in 010_pg_basebackup.pl to verify the change b) Here two different styles of linking is used in the document, we can try to keep it same: + streaming replication and <link linkend="logicaldecoding-replication-slots-synchronization"> + logical replication slot synchronization</link> will use the same + settings later on. The dbname will be recorded only if the dbname was + specified explicitly in the connection string or environment variable + (see <xref linkend="libpq-envars"/>). The updated patch has the changes for the same. Regards, Vignesh
Вложения
В списке pgsql-hackers по дате отправления: