Re: waiting for client write

From: Vijaykumar Jain <vijaykumarjain(dot)github(at)gmail(dot)com>
To: Ayub Khan <ayub(dot)hp(at)gmail(dot)com>
Cc: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Re: waiting for client write
Date: 2021-06-15 17:22:23
Message-ID: CAM+6J96TH69C04=rX1Aj7E08bgaWS4HxZEhoOedkWX=vKi8VLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, 15 Jun 2021 at 21:13, Ayub Khan <ayub(dot)hp(at)gmail(dot)com> wrote:
>
>
> Would it be a cursor issue on postgres, as there seems to be a difference
in how cursors are handled in postgres and Oracle database. It seems
cursors are returned as buffers to the client side. Below are the steps we
take from jdbc side

i did this as well to understand what caused clientwrite wait event.
open a cursor, fetch some rows but not all, and not close them. run this
for multiple connections.
All i got was some client read, but no client write.
I think i might have to intentionally mangle some response packets from
server to client to see if that helps,
but I was thinking i am diverting from the main problem.
unless we have a reproducible dataset to work on, i was not sure it was
helping.

If you can have some sample table(s), and can create a proc on the same
lines as above to query data, and still get the same issues.
that would be helpful to debug further.

else,
you may have to give a stacktrace using pstack or gdb / perf etc to help
figure out what is going on at code level.
Profiling_with_perf <https://wiki.postgresql.org/wiki/Profiling_with_perf>
trace-query-processing-internals-with-debugger
<https://www.highgo.ca/2019/10/03/trace-query-processing-internals-with-debugger/>

This may / may not help, but it'll help learn to eliminate noise :)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Haseeb Khan 2021-06-16 16:25:37 PostgreSQL V13 Replication Issue
Previous Message Atul Kumar 2021-06-15 16:14:05 Re: Master - Slave Replication Window Server