Long living and expiring locks?

2022-05-19 Thread Tim Uckun
I have multiple processes connecting to the same database. In order to prevent race conditions the I would like the process to issue a SELECT FOR UPDATE to lock the records that need to be processed. The problem is that the locks are not inside of a single translation. The process is multi

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Julien Rouhaud
On Thu, May 19, 2022 at 06:38:46PM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > This time with the patch. > > Pushed, with some minor twiddling to make the .pgpass and .pg_service.conf > descriptions more alike. I figured that the .pgpass docs are fine since > (surely) many more people

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Tom Lane
Julien Rouhaud writes: > This time with the patch. Pushed, with some minor twiddling to make the .pgpass and .pg_service.conf descriptions more alike. I figured that the .pgpass docs are fine since (surely) many more people have looked at those passages and not complained, so I made sure that

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Julien Rouhaud
On Thu, May 19, 2022 at 11:53:22PM +0800, Julien Rouhaud wrote: > On Thu, May 19, 2022 at 10:11:06AM -0400, Tom Lane wrote: > > I do not like your proposed wording, as it seems way too dense. > > Can't we avoid the parenthetical remarks (plural) inside a sub-clause? > > You're asking the reader to

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Julien Rouhaud
On Thu, May 19, 2022 at 10:11:06AM -0400, Tom Lane wrote: > I do not like your proposed wording, as it seems way too dense. > Can't we avoid the parenthetical remarks (plural) inside a sub-clause? > You're asking the reader to keep track of about three levels of > interrupt. Yes, I was a bit

Re: In case of network issues, how long before archive_command does retries

2022-05-19 Thread Laurenz Albe
On Thu, 2022-05-19 at 15:43 +0200, Koen De Groote wrote: > On Thu, May 19, 2022 at 9:10 AM Laurenz Albe wrote: > > On Wed, 2022-05-18 at 22:51 +0200, Koen De Groote wrote: > > > When connection is gone or blocked, archive_command fails after the > > > timeout specified > > > by the NFS mount, as

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Tom Lane
Julien Rouhaud writes: > We can't change the default file in older branches obviously, but I'd be a bit > worried about changing the default in the next major version either as it > would > add unnecessary pain for users that do know and rely on the current default. > I > guess we have to live

Re: In case of network issues, how long before archive_command does retries

2022-05-19 Thread Koen De Groote
Hello Laurenz, Thanks for the reply. That would mean the source code is here: https://github.com/postgres/postgres/blob/REL_11_0/src/backend/postmaster/pgarch.c Just to be sure, the "signal" you speak of, this is the result of the command executed by archive_command? If my understanding of the

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Julien Rouhaud
On Thu, May 19, 2022 at 10:57:55AM +0200, Dominique Devienne wrote: > On Thu, May 19, 2022 at 10:17 AM Julien Rouhaud wrote: > > > Or is it instead a lack of symmetry in the implementations of these > > > two mechanisms? > > > > As far as I can see from the code it should be > >

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Dominique Devienne
On Thu, May 19, 2022 at 10:17 AM Julien Rouhaud wrote: > > Or is it instead a lack of symmetry in the implementations of these > > two mechanisms? > > As far as I can see from the code it should be > %APPDATA%\postgresql\.pg_service.conf > > Does this one work? Yes it does! Thanks. > There is a

Re: No default for (user-specific) service file location on Windows?

2022-05-19 Thread Julien Rouhaud
Hi, On Thu, May 19, 2022 at 3:46 PM Dominique Devienne wrote: > > The doc is explicit about defaults for the password file: > From https://www.postgresql.org/docs/current/libpq-pgpass.html > Linux: ~/.pgpass > Windows: %APPDATA%\postgresql\pgpass.conf > > But for the service file OTOH, only the

No default for (user-specific) service file location on Windows?

2022-05-19 Thread Dominique Devienne
Hi, The doc is explicit about defaults for the password file: >From https://www.postgresql.org/docs/current/libpq-pgpass.html Linux: ~/.pgpass Windows: %APPDATA%\postgresql\pgpass.conf But for the service file OTOH, only the Linux default is documented: From:

Re: In case of network issues, how long before archive_command does retries

2022-05-19 Thread Laurenz Albe
On Wed, 2022-05-18 at 22:51 +0200, Koen De Groote wrote: > I've got a setup where archive_command will gzip the wal archive to a > directory that is itself an NFS mount. > > When connection is gone or blocked, archive_command fails after the timeout > specified by the NFS mount, as expected.

Re: About pg_basebackup

2022-05-19 Thread Laurenz Albe
On Thu, 2022-05-19 at 13:18 +0900, 菊池祐 wrote: > I executed the pg_basebackup command to set up a replication configuration in > postgresql, > but the following message appears and replication didn’t complete. > > 2741/2742 tablespaces (/var/lib/pgsql/9.2/bac12609150596/12609150596 kB > (100%),