postgres keeps having blocks

Started by Shaozhong SHIover 2 years ago5 messagesgeneral
Jump to latest
#1Shaozhong SHI
shishaozhong@gmail.com

My postgres is playing up.

I terminated session that is causing blocks many time.

New block appears.

Endless.

What should I do?

Regards,

David

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Shaozhong SHI (#1)
Re: postgres keeps having blocks

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.

#3Ron
ronljohnsonjr@gmail.com
In reply to: David G. Johnston (#2)
Re: postgres keeps having blocks

On 10/18/23 07:40, David G. Johnston wrote:

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.

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Shaozhong SHI (#1)
Re: postgres keeps having blocks

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

#5Rob Sargent
robjsargent@gmail.com
In reply to: Adrian Klaver (#4)
Re: postgres keeps having blocks

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?