Обсуждение: Res: Res: Res: Archive files growth!!!

Поиск
Список
Период
Сортировка

Res: Res: Res: Archive files growth!!!

От
paulo matadr
Дата:



Output:

teste=# \d cliente_fone
                         Table "cadastro.cliente_fone"
         Column         |            Type             |       Modifiers       
------------------------+---------------- -------------+------------------------
 cfon_id                    | integer                             | not null
 clie_id                     | integer                            | not null
 cfon_cdddd             | character(2)                   |
 cfon_nnfone             | character varying(9)       |
 cfon_nnfoneramal     | character varying(4)       |
 cfon_icfonepadrao   | smallint                           |
 fnet_id                     | integer                            | not null
 cfon_tmultimaalteracao | timestamp without time zone | not null default now()
 cfon_nmcontato         | character varying(50)       |
Indexes:
    "cliente_fone_pkey" PRIMARY KEY, btree (cfon_id)
Foreign-key constraints:
    "cliente_fone_clie_id_fkey" FOREIGN KEY (clie_id) REFERENCES cliente(clie_id) ON UPDATE RESTRICT ON DELETE RESTRICT
    "cliente_fone_fnet_id_fkey" FOREIGN KEY (fnet_id) REFERENCES fone_tipo(fnet_id) ON UPDATE RESTRICT ON DELETE RESTRICT

thanks


De: Craig Ringer <craig@postnewspapers.com.au>
Para: paulo matadr <saddoness@yahoo.com.br>
Cc: GENERAL <pgsql-general@postgresql.org>
Enviadas: Segunda-feira, 17 de Novembro de 2008 21:27:27
Assunto: Re: Res: Res: [GENERAL] Archive files growth!!!

paulo matadr wrote:
>
> result for your query
>
> "cliente_fone" 341130 3345 26760k

OK. And what about indexes, logging triggers, etc?

Can you post the output of:

  \d client_fone

from psql?

(I can't really imagine how indexes alone could generate that much
logging data, though).

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes

Re: Res: Res: Res: Archive files growth!!!

От
Craig Ringer
Дата:
paulo matadr wrote:

> teste=# \d cliente_fone
>                          Table "cadastro.cliente_fone"
>          Column         |            Type             |       Modifiers
> ------------------------+---------------- -------------+------------------------
>  cfon_id                    | integer                             | not null
>  clie_id                     | integer                            | not null
>  cfon_cdddd             | character(2)                   |
>  cfon_nnfone             | character varying(9)       |
>  cfon_nnfoneramal     | character varying(4)       |
>  cfon_icfonepadrao   | smallint                           |
>  fnet_id                     | integer                            | not null
>  cfon_tmultimaalteracao | timestamp without time zone | not null default now()
>  cfon_nmcontato         | character varying(50)       |
> Indexes:
>     "cliente_fone_pkey" PRIMARY KEY, btree (cfon_id)
> Foreign-key constraints:
>     "cliente_fone_clie_id_fkey" FOREIGN KEY (clie_id) REFERENCES cliente(clie_id) ON UPDATE RESTRICT ON DELETE
RESTRICT
>     "cliente_fone_fnet_id_fkey" FOREIGN KEY (fnet_id) REFERENCES fone_tipo(fnet_id) ON UPDATE RESTRICT ON DELETE
RESTRICT

I don't see anything there that would account for the growth either.
However, I forgot to check one thing with you when I asked for the table
sizes: Do you have any associated toast table, and if so how big is that?

You can find out with a query like:

select oid, relname, reltype, reltuples, relpages, relpages*8 AS size_kb
from pg_class where relname = 'TABLENAME'
   OR oid = (SELECT reltoastrelid FROM pg_class
             WHERE relname = 'TABLENAME');


It's quite possible that your table, including associated TOAST data, is
actually much bigger than you think it is.

--
Craig Ringer

Res: Archive files growth!!!

От
paulo matadr
Дата:
see  results:
  oid  |   relname    | reltype | reltuples | relpages | size_kb
-------+--------------+---------+-----------+----------+---------
 16506 | cliente_fone |   16507 |    341130 |     3345 |   26760

any configuration about wal_buffer x checkpoint_segments can help me?


De: Craig Ringer <craig@postnewspapers.com.au>
Para: paulo matadr <saddoness@yahoo.com.br>
Cc: GENERAL <pgsql-general@postgresql.org>
Enviadas: Quinta-feira, 20 de Novembro de 2008 8:09:19
Assunto: Re: Res: Res: Res: [GENERAL] Archive files growth!!!

paulo matadr wrote:

> teste=# \d cliente_fone
>                          Table "cadastro.cliente_fone"
>          Column        |            Type            |      Modifiers        ------------------------+---------------- -------------+------------------------
>  cfon_id                    | integer                            | not null
>  clie_id                    | integer                            | not null
>  cfon_cdddd            | character(2)                  |  cfon_nnfone            | character varying(9)      |  cfon_nnfoneramal    | character varying(4)      |  cfon_icfonepadrao  | smallint                          |  fnet_id                    | integer                            | not null
>  cfon_tmultimaalteracao | timestamp without time zone | not null default now()
>  cfon_nmcontato        | character varying(50)      | Indexes:
>    "cliente_fone_pkey" PRIMARY KEY, btree (cfon_id)
> Foreign-key constraints:
>    "cliente_fone_clie_id_fkey" FOREIGN KEY (clie_id) REFERENCES cliente(clie_id) ON UPDATE RESTRICT ON DELETE RESTRICT
>    "cliente_fone_fnet_id_fkey" FOREIGN KEY (fnet_id) REFERENCES fone_tipo(fnet_id) ON UPDATE RESTRICT ON DELETE RESTRICT

I don't see anything there that would account for the growth either. However, I forgot to check one thing with you when I asked for the table sizes: Do you have any associated toast table, and if so how big is that?

You can find out with a query like:

select oid, relname, reltype, reltuples, relpages, relpages*8 AS size_kb
from pg_class where relname = 'TABLENAME'
  OR oid = (SELECT reltoastrelid FROM pg_class
            WHERE relname = 'TABLENAME');


It's quite possible that your table, including associated TOAST data, is actually much bigger than you think it is.

--
Craig Ringer

-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes

Re: Res: Archive files growth!!!

От
Craig Ringer
Дата:
paulo matadr wrote:
> see  results:
>   oid  |   relname    | reltype | reltuples | relpages | size_kb
> -------+--------------+---------+-----------+----------+---------
>  16506 | cliente_fone |   16507 |    341130 |     3345 |   26760


OK, so there is no TOAST table either. I am out of ideas. It's not
indexes, it's not toast table contents, it's not some action being done
by a trigger, so why is so much WAL logging data generated for these
inserts?

Does anybody have any ideas about what's happening, or any suggestions
about how to find out?

--
Craig Ringer