Re: Auto Partitioning

From: Richard Troy <rtroy(at)ScienceTools(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, Gregory Stark <stark(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Markus Schiltknecht <markus(at)bluegap(dot)ch>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, NikhilS <nikkhils(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Auto Partitioning
Date: 2007-04-06 19:02:48
Message-ID: Pine.LNX.4.33.0704061155280.10617-100000@denzel.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


> David Fetter wrote:
> > On Fri, Apr 06, 2007 at 09:22:55AM -0700, Joshua D. Drake wrote:
> >
> >>> The people that use it are the people stuck by dogmatic rules about
> >>> "every table must have a primary key" or "every logical constraint
> >>> must be protected by a database constraint". Ie, database shops run
> >>> by the CYA principle.
> >> Or ones that actually believe that every table where possible should
> >> have a primary key.
> >>
> >> There are very, very few instances in good design where a table does
> >> not have a primary key.
> >>
> >> It has nothing to do with CYA.
> >
> > That depends on what you mean by CYA. If you mean, "taking a
> > precaution just so you can show it's not your fault when the mature
> > hits the fan," I agree. If you mean, "taking a precaution that will
> > actually prevent a problem from occurring in the first place," it
> > definitely does.
>
> Heh, fair enough. When I think of CYA, I think of the former.
>
> Joshua D. Drake

...I was thinking the point was more on "primary key" as in syntax, as
opposed to a table that has a/an attribute(s) that is acknowledged by DML
coders as the appropriate way to use the stored data. That is, I may very
well _not_ want the overhead of an index of any kind, forced uniqueness,
etc, but might also well think of a given attribute as the primary key.
Use of constraints in lieu of "primary key" come to mind...

'Course, maybe I missed the point! -smile-

'Nother thought: CYA _can_ have odeous performance costs if
over-implemented. It's a matter of using actual use-cases - or observed
behavior - to taylor the CYA solution to fit the need without undue
overhead.

Rgds,
Richard

--
Richard Troy, Chief Scientist
Science Tools Corporation
510-924-1363 or 202-747-1263
rtroy(at)ScienceTools(dot)com, http://ScienceTools.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-04-06 19:12:39 Fate of pgsnmpd
Previous Message Greg Smith 2007-04-06 18:56:21 Re: Load distributed checkpoint V3

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-04-06 19:26:54 Re: Auto Partitioning
Previous Message Pavan Deolasee 2007-04-06 19:02:09 HOT Patch - Ready for review