Re: File content logging during execution of COPY queries
От | Grigory Smolkin |
---|---|
Тема | Re: File content logging during execution of COPY queries |
Дата | |
Msg-id | e3b5bf05-4555-511f-0199-ad8863504ce2@postgrespro.ru обсуждение исходный текст |
Ответ на | File content logging during execution of COPY queries (was: Better logging of COPY queries if log_statement='all') (Aleksander Alekseev <a.alekseev@postgrespro.ru>) |
Ответы |
Re: File content logging during execution of COPY queries
|
Список | pgsql-hackers |
<p><br /><br /><div class="moz-cite-prefix">On 10/20/2016 12:36 PM, Aleksander Alekseev wrote:<br /></div><blockquote cite="mid:20161020093652.GB24208@e733.localdomain"type="cite"><blockquote type="cite"><blockquote type="cite"><blockquotetype="cite"><pre wrap="">According to my colleagues it would be very nice to have this feature. For instance, if you are trying to optimize PostgreSQL for application that uses COPY and you don't have access to or something like this. It could also be useful in some other cases. </pre></blockquote><pre wrap=""> This use-case doesn't really make much sense to me. Can you explain it in more detail? Is the goal here to replicate all of the statements that are changing data in the database? </pre></blockquote><pre wrap=""> The idea is to record application workload in real environment and write a benchmark based on this record. Then using this benchmark we could try different OS/DBMS configuration (or maybe hardware), find an extremum, then change configuration in production environment. It's not always possible to change an application or even database (e.g. to use triggers) for this purpose. For instance, if DBMS is provided as a service. Currently PostgreSQL allows to record all workload _except_ COPY queries. Considering how easily it could be done I think it's wrong. Basically the only real question here is how it should look like in postgresql.conf. </pre></blockquote><pre wrap=""> OK, how about introducing a new boolean parameter named log_copy? Corresponding patch is attached. </pre></blockquote> This is a useful feature I was waiting for some time.<br /> If some application which workload you wantto collect is using COPY statement, then recording network traffic was your only option.<br /><pre class="moz-signature"cols="72">-- Grigory Smolkin Postgres Professional: <a class="moz-txt-link-freetext" href="http://www.postgrespro.com">http://www.postgrespro.com</a> The Russian Postgres Company</pre>
В списке pgsql-hackers по дате отправления: