Re: My honours project - databases using dynamically attached entity-properties

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: josh(at)agliodbs(dot)com, postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Hammond <andrew(dot)george(dot)hammond(at)gmail(dot)com>
Subject: Re: My honours project - databases using dynamically attached entity-properties
Date: 2007-03-13 09:27:36
Message-ID: 1173778056.9058.122.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2007-03-13 at 00:43, Richard Huxton wrote:
> Josh Berkus wrote:
> > I really don't see any way you could implement UDFs other than EAV that
> > wouldn't be immensely awkward, or result in executing DDL at runtime.
>
> What's so horrible about DDL at runtime? Obviously, you're only going to
> allow specific additions to specific schemas/tables, but why not?

Well, exclusively locking the table for DDL is not always possible in
production systems. We also shortly had a solution where we added new
columns on the fly, and we had to ditch it... it was simply not working.
The users were usually adding columns in the peek business hours, and in
the same hours it was simply impossible to take an exclusive lock on
that table. I think DDL will actually also exclusively lock parent
tables of FK relationships (I might be mistaken here, but I think I have
seen such lock), which is even worse.

After it caused extensive perceived downtime for hours, we simply
redesigned the feature so that the users need now to announce beforehand
how many different types of new columns they will need and we just
create a few extra of them, and assign them to the users needs as they
need it... the unused columns stay null and hopefully don't have too big
overhead, but it's the simplest solution we found which actually works.
When the user runs out of spare columns, the admin will create some new
spares in quiet hours.

Cheers,
Csaba.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Huxton 2007-03-13 09:31:45 Re: My honours project - databases using dynamically attached entity-properties
Previous Message Heikki Linnakangas 2007-03-13 09:18:50 Re: CLUSTER and MVCC