Re: PostgreSQL in an embedded platform

From: AgentM <agentm(at)themactionfaction(dot)com>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL in an embedded platform
Date: 2006-11-06 20:28:42
Message-ID: 903FCE7E-376E-4975-AA63-600966DDFA4A@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Nov 6, 2006, at 5:59 , Ben wrote:

> Hello Folks,
> i've been a postgresql user for a lot of years, mainly using it on
> common x86 hw; now for a personal project of mine i wish to know your
> opinion on porting it on an embedded platform.
> I'm currently using PostgreSQL in my home automation project (x86
> platform) not for storing huge amount of data but for handling events
> (with triggers and SP), use an high level programming language (PgSQL
> with some custom functions), handling data and states (with integrity)
> and so on.
> So this is a small DB, not so much data on it, a combination of Cron,
> Apache/PHP, PostgreSQL and some custom programming can handle it
> all, i
> rely mostly on PgSQL for high level customization despite of its
> original scope; strange application isn't it ?
> PostgreSQL is the core system, it's informed on everything happens on
> real environment and it does what it need to do.
> I'm currently evaluating to port the whole platform into an embedded
> system, i didn't chosen it yet but i'm looking for at something
> related
> to Linksys APs hw ports, maybe some fancy hw like that. Cron and PHP
> are portable and available, i can replace Apache with some light
> HTTPD,
> but what about PostgreSQL ?
> Is there anyone using it on small non x86 hw ? limited resources
> (let's
> say you got a compressed linux kernel and software in less than 8-4Mb
> ROM) and fully featured with triggers, SPs and so on ?
> I know mostly of you are using it in a massive storage cluster or HA
> system, but i greatly appreciated this DB even for its internals
> (Object Oriented, Stored Procedures, SQL custom Programming, triggers,
> integrity and so on), these are the main features i choose it instead
> of MySQL and others

I have asked about this in the past. However, your machine is clearly
much smaller than mine. We have a 1U network appliance with 256 MB
RAM and a flash backing store. We currently use MySQL over a RAM fs
that syncs every 10 minutes (!). I would much rather use postgresql
and of course it works over the RAM fs, but we lose the point of
using postgresql- reliability.

I'm pretty sure that your box is simply too small. For starters,
postgresql likes to start with a 16 MB WAL. That's not to say that
it's impossible to run on your machine- all of the assumptions
postgresql makes about a "minimal" setup can be further reduced, but
what you end up with is neither reliable nor speedy. My opinion is
that trying to get postgresql to run under your embedded system
constraints would be a waste of time.

You might try SQLite. Unfortunately, it is missing some features
which we would need- such as foreign keys (!) and full alter table
support.
http://sqlite.org/omitted.html

Good luck with your project!
-M

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alain Roger 2006-11-06 21:02:49 data does not exist :-(
Previous Message Matthew Peter 2006-11-06 20:16:53 Re: select result / functions from another database in plpgsql