Re: [PERFORM] COPY TO stdout statements occurrence in log files

2011-01-14 Thread Maciek Sakrejda
 Is this normal? I'm afraid because my application doesn't run this kind of
 statement, so how can I know what is doing these commands? Maybe pg_dump?

I think pg_dump is likely, yes, if you have that scheduled. I don't
think anything in the log file will identify it as pg_dump explicitly
(I believe as far as the server is concerned, pg_dump is just another
client), but if you're concerned about this, you can add the client
pid (%p) to log_line_prefix in postgresql.conf, log the pg_dump pid
through whatever mechanism manages that, and compare.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
msakre...@truviso.com
www.truviso.com

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


Re: [PERFORM] COPY TO stdout statements occurrence in log files

2011-01-14 Thread Chris Browne
msakre...@truviso.com (Maciek Sakrejda) writes:
 Is this normal? I'm afraid because my application doesn't run this kind of
 statement, so how can I know what is doing these commands? Maybe pg_dump?

 I think pg_dump is likely, yes, if you have that scheduled. I don't
 think anything in the log file will identify it as pg_dump explicitly
 (I believe as far as the server is concerned, pg_dump is just another
 client), but if you're concerned about this, you can add the client
 pid (%p) to log_line_prefix in postgresql.conf, log the pg_dump pid
 through whatever mechanism manages that, and compare.

That's an option...  More are possible...

1.  Our DBAs have been known to create users specifically for doing
backups (dumpy).  It doesn't seem like a *huge* proliferation of users
to have some 'utility' user names for common processes.

2.  In 9.1, there will be a new answer, as there's a GUC to indicate the
application_name.
-- 
Programming today  is a race  between software engineers  striving to
build bigger and better  idiot-proof programs, and the Universe trying
to  produce  bigger  and  better  idiots.  So  far,  the  Universe  is
winning.  -- Rich Cook

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


Re: [PERFORM] COPY TO stdout statements occurrence in log files

2011-01-14 Thread Marti Raudsepp
On Fri, Jan 14, 2011 at 23:19, Chris Browne cbbro...@acm.org wrote:
 2.  In 9.1, there will be a new answer, as there's a GUC to indicate the
 application_name.

Actually this was already introduced in PostgreSQL 9.0 :)

You can add application_name to your log_line_prefix with %a. For
pg_dump it will display pg_dump

Regards,
Marti

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