Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not really, the original Postgres was developed in a mix of 17000 lines of Lisp and 63000 lines of C. This was difficult to develop/debug at that time. Probably still would be.

It had a 'gigantic' memory footprint of 4 MB - the all-in-C version only used 1 MB. The Lisp version was also slower and they didn't use features like GC...

http://db.cs.berkeley.edu/papers/ERL-M90-34.pdf



> By a process of elimination, we decided to try writing POSTGRES in LISP. We expected that it would be especially easy to write the optimizer and inference engine in LISP, since both are mostly tree processing modules. Moreover, we were seduced by AI claims of high programmer productivity for applications written in LISP.

Yes, that's what I remembered, they started out using LISP.

> Our feeling is that the use of LISP has been a terrible mistake for several reasons.

"Terrible mistake" is pretty unambiguous language.


> Yes, that's what I remembered, they started out using LISP.

Only for the optimizer and the inference engine.

The authors also had no prior experience developing an application in a hybrid of C and Lisp.

> "Terrible mistake" is pretty unambiguous language.

4MB memory footprint was a terrible mistake at that time.


They obviously started writing Postgres in LISP, because "we soon realized that parts of the system were more easily coded in C" wouldn't make sense if writing a hybrid had been the initial plan.

They tried going all LISP at first, and failed. Was it them, or was it LISP?


Since they had no experience in Lisp programming, they chose the wrong language just for 'doing something different'.

Writing a database in a performant way isn't something for a Lisp newbie.

"By the time Version 1 was operational, it contained about 17000 lines of LISP and about 63000 lines of C".

Version 1 was written in a mix of C and Lisp.

That's also not surprising, since that would have been a common approach for some technical reasons. But it's a bit difficult to do - again, especially as a newbie.

> Was it them, or was it LISP?

Their lack of experience, their approach, the LISP implementation they were using, the hardware constraints (4 MB footprint was not acceptable to them), ... A conservative approach using a lower-level systems programming language like C was a good choice at that time and they were much more successful with that approach.

There were/are a bunch of databases written in Lisp and even in a mix of C and Lisp: Statice (Symbolics), Zeitgeist (TI), Orion/Itasca, AllegroStore (Franz), ... But they were written by Lisp experts.


Well they were using LISP without GC because they couldn't afford stop-the-world pauses and concurrent GC didn't exist yet. If it was LISP, the several aspects of LISP they describe having trouble with are all obsolete considerations.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: