Thread: postgres keeps having blocks
My postgres is playing up.
I terminated session that is causing blocks many time.
New block appears.
Endless.
What should I do?
Regards,
David
On Wednesday, October 18, 2023, Shaozhong SHI <shishaozhong@gmail.com> wrote:
My postgres is playing up.I terminated session that is causing blocks many time.New block appears.Endless.What should I do?
PostgreSQL is probably just doing what you told it. Not possible to give advice without knowing what you told it to do. You should put more effort into showing others what your app is doing and how you are debugging it and the database.
Killing sessions without changing anything else is unlikely to result in a change of behavior.
David J.
On 10/18/23 07:40, David G. Johnston wrote:
That's the definition of insanity...
On Wednesday, October 18, 2023, Shaozhong SHI <shishaozhong@gmail.com> wrote:My postgres is playing up.I terminated session that is causing blocks many time.New block appears.Endless.What should I do?PostgreSQL is probably just doing what you told it. Not possible to give advice without knowing what you told it to do. You should put more effort into showing others what your app is doing and how you are debugging it and the database.Killing sessions without changing anything else is unlikely to result in a change of behavior.
That's the definition of insanity...
--
Born in Arizona, moved to Babylonia.
Born in Arizona, moved to Babylonia.
On 10/18/23 04:27, Shaozhong SHI wrote: > My postgres is playing up. > > I terminated session that is causing blocks many time. > > New block appears. > > Endless. > > What should I do? Provide more information. 1) Postgres version. 2) Define what blocks means. 3) Show us the statements/code that is causing the issue. 4) Post relevant sections from the Postgres log. > > Regards, > > David -- Adrian Klaver adrian.klaver@aklaver.com
On 10/18/23 10:15, Adrian Klaver wrote: > On 10/18/23 04:27, Shaozhong SHI wrote: >> My postgres is playing up. >> >> I terminated session that is causing blocks many time. >> >> New block appears. >> >> Endless. >> >> What should I do? > > Provide more information. > > 1) Postgres version. > > 2) Define what blocks means. > > 3) Show us the statements/code that is causing the issue. > > 4) Post relevant sections from the Postgres log. > > Commit your transactions?