| From: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru> | 
|---|---|
| To: | Stephen Frost <sfrost(at)snowman(dot)net> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | File content logging during execution of COPY queries (was: Better logging of COPY queries if log_statement='all') | 
| Date: | 2016-10-20 09:36:52 | 
| Message-ID: | 20161020093652.GB24208@e733.localdomain | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> > > 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.
> > 
> > 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?
> 
> 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.
OK, how about introducing a new boolean parameter named log_copy?
Corresponding patch is attached.
-- 
Best regards,
Aleksander Alekseev
| Attachment | Content-Type | Size | 
|---|---|---|
| log-copy-v2.patch | text/x-diff | 4.4 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeevan Chalke | 2016-10-20 09:38:28 | Re: Aggregate Push Down - Performing aggregation on foreign server | 
| Previous Message | Etsuro Fujita | 2016-10-20 09:06:48 | Re: postgres_fdw : altering foreign table not invalidating prepare statement execution plan. |