| From: | Ron Johnson <ronljohnsonjr(at)gmail(dot)com> |
|---|---|
| To: | Raj <rajeshkumar(dot)dba09(at)gmail(dot)com> |
| Cc: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Slowness |
| Date: | 2026-04-13 19:04:54 |
| Message-ID: | CANzqJaA8GpURz3fAKhnpXLQvOguhwBAyacvCK1-wdkFGP0Nh0w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
I'd:
1. enable log_min_duration_statement,
2. capture pg_stat_user_indexes,
3. tune autovacuum vacuum and analyze threshold values (the defaults are in
my experience way too high),
4. query pg_stat_user_tables joined to pg_class to see which tables need
more manual vacuuming and/or analyzing, and
5. check effective_cache_size, shared_buffers, work_mem and
maintenance_work_mem to see if they're set to Best Practice values.
On Mon, Apr 13, 2026 at 1:44 PM Raj <rajeshkumar(dot)dba09(at)gmail(dot)com> wrote:
> Ok great. If I start with normal health check top, free -h, patronictl
> list, and all status of components such as etcd, haproxy etcd pgnouncer ,
> then stat user tables, pgstatactivity, pgstatstatements and error log.
> Apart from this, what dba should do?
>
> On Mon, 13 Apr 2026, 22:45 Laurenz Albe, <laurenz(dot)albe(at)cybertec(dot)at> wrote:
>
>> On Mon, 2026-04-13 at 22:05 +0530, Raj wrote:
>> > On Mon, 13 Apr 2026, 18:32 Laurenz Albe, <laurenz(dot)albe(at)cybertec(dot)at>
>> wrote:
>> > > On Mon, 2026-04-13 at 18:25 +0530, Raj wrote:
>> > > > When customer says they are facing slowness, what all wee need to
>> check in
>> > > > postgres db with 3 node patroni set up (sync between 1 and 2) -
>> async with dr.
>> > > >
>> > > > We recently migrated from oracle to postgres..vacuum analyze is
>> done.
>> > > >
>> > > > How to check this during the time slowness faced and also after
>> couple of hrs of issue window.
>> > > >
>> > > > Should we start with pgstatstatements and logs or how is it.
>> Help.me hight level what all I need to check
>> > >
>> > > You have to figure out *what exactly* is slow. The customer has to
>> tell you which
>> > > statements are slow. The parameter "log_min_duratoin_statement" might
>> help.
>> > >
>> > > Then you have to tune those statements.
>> >
>> > How long min duration statement is decided. Is it dba who decide how
>> much needs to be set?
>>
>> Sorry, I made a typo. It is a database parameter and called
>> "log_min_duration_statement".
>>
>> Your questions seem to indicate that you have almost no knowledge about
>> PostgreSQL.
>> Without database knowledge, it is impossible to find slow statements, let
>> alone tune
>> them. Perhaps you should spend some time with the PostgreSQL
>> documentation or hire
>> a consultant.
>>
>> Yours,
>> Laurenz Albe
>>
>
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Laurenz Albe | 2026-04-14 05:33:30 | Re: Slowness |
| Previous Message | Raj | 2026-04-13 17:43:41 | Re: Slowness |