Re: captura de insert, update y delete en logs

From: "Ing (dot) Marcos Luís Ortíz Valmaseda" <mlortiz(at)uci(dot)cu>
To: oscar arocha <arocha(dot)oscar(at)gmail(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: captura de insert, update y delete en logs
Date: 2009-12-13 10:26:05
Message-ID: 4B24C13D.5070302@uci.cu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

oscar arocha escribió:
> Buenos días, les escribo solicitando su ayuda ya que necesito capturar
> en los logs de postgres, tengo Postgres 8.3 bajo Debian LENNY en un
> servidor y Postgres 8.1 bajo Debian LENNY en otro servidor, he editado
> el archivo /etc/postgres/8.3/main/postgres.conf pero no logro dar con
> la solucion.
>
> Gracias de antemano.
¿Cuáles fueron los parámetros que cambiaste en el postgresql.conf?
Debe ser el parámetro log_statement=mod
Aquí te dejo lo que dice la documentación.
-----------------------------------------------------
log_statement (enum)

Controls which SQL statements are logged. Valid values are none, ddl,
mod, and all. ddl logs
all data definition statements, such as CREATE, ALTER, and DROP
statements. mod logs all ddl
statements, plus data-modifying statements such as INSERT, UPDATE,
DELETE, TRUNCATE, and
COPY FROM. PREPARE, EXECUTE, and EXPLAIN ANALYZE statements are also
logged if their
contained command is of an appropriate type. For clients using extended
query protocol, logging
occurs when an Execute message is received, and values of the Bind
parameters are included
(with any embedded single-quote marks doubled).
The default is none. Only superusers can change this setting.
Note: Statements that contain simple syntax errors are not logged even
by the
log_statement = all setting, because the log message is emitted only
after basic parsing
has been done to determine the statement type. In the case of extended
query protocol,
this setting likewise does not log statements that fail before the
Execute phase (i.e., during
parse analysis or planning). Set log_min_error_statement to ERROR (or
lower) to log such
statements.

-------------------------------------------------------------------------------------
Saludos

--
-------------------------------------
"TIP 4: No hagas 'kill -9' a postmaster"
Ing. Marcos Luís Ortíz Valmaseda
PostgreSQL System DBA
Centro de Tecnologías de Almacenamiento y Anális de Datos (CENTALAD)
Universidad de las Ciencias Informáticas

Linux User # 418229
http://www.postgresql-es.org
http://www.postgresql.org
http://www.planetpostgresql.org
http://www.freebsd.org/es

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message oscar arocha 2009-12-13 15:50:31 captura de insert, update y delete en logs
Previous Message Jaime Casanova 2009-12-12 20:23:35 Re: [pgsql-es-ayuda] enviar a lista de distribución de postgres