Debraj Manna <subharaj(dot)manna(at)gmail(dot)com> writes:
> What profiling will help in this case?
If you're on a reasonably modern Linux platform, I'd try "perf",
which is capable of gathering a system-wide profile. Note you
will need debug symbols installed for Postgres to get good
results from any profiling tool.
regards, tom lane