| From: | Jimmy Augustine <jimmy(dot)augustine(at)enyx(dot)fr> |
|---|---|
| To: | Andreas Kretschmer <andreas(at)a-kretschmer(dot)de> |
| Cc: | "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
| Subject: | Re: PostgreSQL 9.6 Temporary files |
| Date: | 2018-03-19 17:29:35 |
| Message-ID: | CAF3uhZG3bdTgaxv+CfYd4C_eEy0LSSE2NH16QY2MTZuqa40_tg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
2018-03-19 18:25 GMT+01:00 Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>:
> On 19 March 2018 18:21:42 CET, Jimmy Augustine <jimmy(dot)augustine(at)enyx(dot)fr>
> wrote:
> >2018-03-19 18:15 GMT+01:00 Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>:
> >
> >> On 03/19/2018 10:12 AM, Jimmy Augustine wrote:
> >>
> >>
> >>> On 03/19/2018 09:31 AM, Jimmy Augustine wrote:
> >>>
> >>> Dear Friends,
> >>>
> >>> I am newbie to postgresql.
> >>> I have 162 GB on my database but when I check size
> >of all
> >>> tables, I approximately obtain 80 GB.
> >>> I also see that I have 68GB of temporary files
> >however
> >>> I only
> >>> found 2.4MB at postgres/data/base/pgsql_tmp.
> >>>
> >>>
> >>> Exactly how did you determine this?
> >>>
> >>> I used this command and sum result for all database :
> >>> SELECT pg_size_pretty(pg_total_relation_size('table_name'));
> >>>
> >>> And this for complete database :
> >>> SELECT pg_size_pretty(pg_database_size('Database Name'));
> >>>
> >>>
> >>> So where did the 68GB number for temporary files come from?
> >>>
> >>> I don't measure this value by my own. I was disappointed by the gap
> >>> between the two queries, so I checked pgAdmin 4 and I saw this
> >value.
> >>>
> >>
> >> In what section of pgAdmin4?
> >>
> >In section "Statistics" when I click on my database.
> >
> >Or do you know what query it used?
> >>
> >I have found this but not sure
> >
> >SELECT temp_files AS "Temporary files"
> > , temp_bytes AS "Size of temporary files"FROM pg_stat_database db;
>
>
> That's aggregated. Not current values.
>
Ah did you know some documentation about that ?
> Andreas
>
>
> --
> 2ndQuadrant - The PostgreSQL Support Company
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2018-03-19 17:35:37 | Re: PostgreSQL 9.6 Temporary files |
| Previous Message | Jimmy Augustine | 2018-03-19 17:27:42 | Re: PostgreSQL 9.6 Temporary files |