On Thu, May 18, 2017 at 1:46 PM, John R Pierce <pie...@hogranch.com> wrote:
> On 5/18/2017 1:40 PM, Andrew Kerber wrote: > >> It appears to me you might be making this a lot more difficult than >> necessary. Why not just pre-create the required partitions daily or weekly >> or monthly? Or do you have a requirement that a new partition only be >> created the first time it is required? >> > > +1 > > we create new partitions in advance of their being needed as part of a > maintenance process that's strictly single threaded. ​While I've been trying to explain the mechanics involved here I agree that the whole idea of exceptionally creating a table in a trigger is just asking for trouble. I do get the idea of not wanting an external maintenance process involved that needs to be setup and maintained, and maybe there are now better options with "workers", but the trade-offs involved would start leaning me heavily toward having a maintenance routine, especially in a production environment, and at that point you should mirror production in development. David J.