Re: New Event Trigger: table_rewrite

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New Event Trigger: table_rewrite
Date: 2014-11-15 23:57:34
Message-ID: CA+U5nMKRzif4PmavxzR08+Qge9mQTm0cX6M8OPW3+XuUd2xnNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 November 2014 12:35, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
> 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.

That looks complete, very useful and well documented.

I'm looking to commit this tomorrow.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-11-16 00:36:05 Re: Doing better at HINTing an appropriate column within errorMissingColumn()
Previous Message Simon Riggs 2014-11-15 23:35:39 Re: Improve automatic analyze messages for inheritance trees