Thread: postgres keeps having blocks

postgres keeps having blocks

From
Shaozhong SHI
Date:
My postgres is playing up.

I terminated session that is causing blocks many time.

New block appears.

Endless.

What should I do?

Regards,

David

Re: postgres keeps having blocks

From
"David G. Johnston"
Date:


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.

Re: postgres keeps having blocks

From
Ron
Date:
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.

Re: postgres keeps having blocks

From
Adrian Klaver
Date:
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




Re: postgres keeps having blocks

From
Rob Sargent
Date:
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?