Robert Haas <robertmh...@gmail.com> writes:
> On Wed, Jul 26, 2017 at 2:41 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> The bigger issue is whether there's some failure case this would cause
>> that I'm missing altogether. Thoughts?
> I think dependencies are fundamentally the right model for this sort
> of problem. I can't imagine what could go wrong that wouldn't amount
> to a failure to insert all of the right dependencies, and thus be
> fixable by inserting whatever was missing.
I tend to agree. One fairly obvious risk factor is that we end up with
circular dependencies, but in that case we have conflicting requirements
and we're gonna have to decide what to do about them no matter what.
Another potential issue is pg_dump performance; this could result in
a large increase in the number of DumpableObjects and dependency links.
The topological sort is O(N log N), so we shouldn't hit any serious big-O
problems, but even a more-or-less-linear slowdown might be problematic for
some people. On the whole though, I believe pg_dump is mostly limited by
its server queries, and that would probably still be true.
But the big point: even if we had the code for this ready-to-go, I'd
be hesitant to inject it into v10 at this point, let alone back-patch.
If we go down this path we won't be seeing a fix for the matview ordering
problem before v11 (at best). Maybe that's acceptable considering it's
been there for several years already, but it's annoying.
So I'm thinking we should consider the multi-pass patch I posted as
a short-term, backpatchable workaround, which we could hope to replace
with dependency logic later.
regards, tom lane
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: