Re: Read-only connectios optimizatios
От | peter plachta |
---|---|
Тема | Re: Read-only connectios optimizatios |
Дата | |
Msg-id | 1321473A-8A9F-4EA0-AC11-1312012623CC@gmail.com обсуждение исходный текст |
Ответ на | Re: Read-only connectios optimizatios (Laurenz Albe <laurenz.albe@cybertec.at>) |
Ответы |
RE: [EXT] Re: Read-only connectios optimizatios
|
Список | pgsql-performance |
You can still block vacuum from running if you have long running (or very aggressive) read transactions. I don’t think theyare very helpful or performant from a Postgres engine perspective. They can be helpful in application development because they will fail if devs attempt any mutations inside read only (fromwhat I recall). Sent from my iPhone > On Jan 25, 2025, at 10:01 AM, Laurenz Albe <laurenz.albe@cybertec.at> wrote: > > On Sat, 2025-01-25 at 14:55 +0000, Edson Richter wrote: >> -Connections are established using the jdbc "readonly" attribute. >> >> Does PostgreSQL perform any optimization on queries in this scenario to avoid >> establishing locks? Or are these queries treated like any other? > > The only difference that I am aware of is that read-only transactions at the > SERIALIZABLE isolation level can release predicate locks earlier, which can > benefit performance. > > But I don't think that you need to worry: reading transactions only take an > ACCESS SHARE lock on tables, which won't conflict with data modifications. > > Yours, > Laurenz Albe > >
В списке pgsql-performance по дате отправления: