From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: New Event Trigger: table_rewrite |
Date: | 2014-11-07 12:35:10 |
Message-ID: | m2vbmrur29.fsf@2ndQuadrant.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> It would be more useful to work on the applications of this....
>
> 1. INSERT into a table
> * Action start time
> * Schema
> * Tablename
> * Number of blocks in table
> which would then allow you to do these things run an assessment report
> showing which tables would be rewritten.
That should be done by the user, from within his Event Trigger code. For
that to be possible, the previous patch was missing a way to expose the
OID of the table being rewritten, I've now added support for that.
> 2. Get access to number of blocks, so you could limit rewrites only to
> smaller tables by putting a block limit in place.
Also, I did expand the docs to fully cover your practical use case of a
table_rewrite Event Trigger implementing such a table rewrite policy.
> 3. It might be even cooler to contemplate having pg_stat_activity
> publish an estimated end time.
> We'd probably need some kind of time_per_block parameter for each
> tablespace so we can estimate the time.
That feels like another patch entirely.
Regards,
--
Dimitri Fontaine 06 63 07 10 78
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
Attachment | Content-Type | Size |
---|---|---|
table_rewrite.2.patch | text/x-patch | 58.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2014-11-07 12:53:28 | Re: pg_receivexlog --status-interval add fsync feedback |
Previous Message | Katharina Büchse | 2014-11-07 12:19:22 | Re: two dimensional statistics in Postgres |