PostgreSQL future ideas
Dear PG hackers,
Has there been any idea to port PG to a more modern programming language
like C++? Of course there are some minor obstacles like a new OO design,
this being a gigantic task to perform and rewriting almost everything etc...
I am very interested to hear your opinion.
(You can take your M16 and start shooting now)
Regards,
Gevik
On Fri, Sep 19, 2008 at 8:54 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
Dear PG hackers,
Has there been any idea to port PG to a more modern programming language
like C++? Of course there are some minor obstacles like a new OO design,
this being a gigantic task to perform and rewriting almost everything etc...
I am very interested to hear your opinion.
The plan is to start porting it to Java after the next release -
probably at the beginning of April.
:-p
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
Gevik Babakhani wrote:
Has there been any idea to port PG to a more modern programming language
like C++?
No.
(You can take your M16 and start shooting now)
My pleasure ;-).
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
On Fri, 19 Sep 2008 21:54:53 +0200
"Gevik Babakhani" <pgdev@xs4all.nl> wrote:
Dear PG hackers,
Has there been any idea to port PG to a more modern programming
language like C++? Of course there are some minor obstacles like a
new OO design, this being a gigantic task to perform and rewriting
almost everything etc... I am very interested to hear your opinion.(You can take your M16 and start shooting now)
No shooting required, your email client reached out and killed you when
you hit send.
Joshua D. Drake
Regards,
Gevik
--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
It might look like an impossible goal to achieve.. But if there is any
serious plan/idea/ammo for this, I believe it would be very beneficial to
the
continuity of PG.
Regards,
Gevik.
Show quoted text
-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Dave Page
Sent: Friday, September 19, 2008 9:58 PM
To: Gevik Babakhani
Cc: PGSQL Hackers
Subject: Re: [HACKERS] PostgreSQL future ideasOn Fri, Sep 19, 2008 at 8:54 PM, Gevik Babakhani
<pgdev@xs4all.nl> wrote:Dear PG hackers,
Has there been any idea to port PG to a more modern programming
language like C++? Of course there are some minor obstacleslike a new
OO design, this being a gigantic task to perform and
rewriting almost everything etc...
I am very interested to hear your opinion.
The plan is to start porting it to Java after the next
release - probably at the beginning of April.:-p
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com--
Sent via pgsql-hackers mailing list
(pgsql-hackers@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, 19 Sep 2008 20:57:36 +0100
"Dave Page" <dpage@pgadmin.org> wrote:
On Fri, Sep 19, 2008 at 8:54 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
Has there been any idea to port PG to a more modern programming language
like C++? Of course there are some minor obstacles like a new OO design,The plan is to start porting it to Java after the next release -
probably at the beginning of April.
I don't think that we should rush into any one language without
checking the alternatives. Personally I think we should port everything
to Intercal.
--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
On Fri, Sep 19, 2008 at 4:32 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
It might look like an impossible goal to achieve.. But if there is any
serious plan/idea/ammo for this, I believe it would be very beneficial to
the continuity of PG.
I don't think so. Firebird rewrote their entire kernel to be C++ and
in doing so, lost a lot of maturity along-the-way IMHO. Similarly
switching to another language would require a large number of people
not only familiar with Postgres internals, but also in the new
programming language; it wouldn't make sense to switch to something
like C++ and not make full use of the language.
I don't see how you think it will help. Most universities (here in
the US at least), are shying away from teaching C/C++. So, in the
long run, I don't see how that would really help us get more developer
involvement.
--
Jonah H. Harris, Senior DBA
myYearbook.com
On Fri, Sep 19, 2008 at 08:57:36PM +0100, Dave Page wrote:
On Fri, Sep 19, 2008 at 8:54 PM, Gevik Babakhani <pgdev@xs4all.nl> wrote:
Dear PG hackers,
Has there been any idea to port PG to a more modern programming language
like C++? Of course there are some minor obstacles like a new OO design,
this being a gigantic task to perform and rewriting almost everything etc...
I am very interested to hear your opinion.The plan is to start porting it to Java after the next release -
probably at the beginning of April.
Already done!
http://www.postgresql.org/community/weeklynews/pwn20050401
Cheers,
David
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
I don't think so. Firebird rewrote their entire kernel to be
C++ and in doing so, lost a lot of maturity along-the-way
I would not make any sense to put/group functions in one or more classes
without using the OO patterns. I guess this is what Firebird has done.
Similarly switching to another language would require
a large number of people not only familiar with Postgres
internals, but also in the new programming language; it
wouldn't make sense to switch to something like C++ and not
make full use of the language.
True. It would be an enormous task...
I don't see how you think it will help. Most universities
(here in the US at least), are shying away from teaching
C/C++. So, in the long run, I don't see how that would
really help us get more developer involvement.
Unless I am very off. C++ is a natural choice when porting (upgrading) ANSI
C application.
As far as I know, most universities teach some sort of OO programming
language like JAVA or C# to help students understand OO programming.
I understand that C++ is less popular but JAVA/C# would be the wrong choice
for this.
Regards,
Gevik.
Show quoted text
--
Jonah H. Harris, Senior DBA
myYearbook.com--
Sent via pgsql-hackers mailing list
(pgsql-hackers@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of
Jonah H. Harris
Sent: Friday, September 19, 2008 10:39 PM
To: Gevik Babakhani
Cc: Dave Page; PGSQL Hackers;
heikki.linnakangas@enterprisedb.com; jd@commandprompt.com
Subject: Re: [HACKERS] PostgreSQL future ideasOn Fri, Sep 19, 2008 at 4:32 PM, Gevik Babakhani
<pgdev@xs4all.nl> wrote:It might look like an impossible goal to achieve.. But if
there is any
serious plan/idea/ammo for this, I believe it would be very
beneficial
to the continuity of PG.
I don't think so. Firebird rewrote their entire kernel to be
C++ and in doing so, lost a lot of maturity along-the-way
IMHO. Similarly switching to another language would require
a large number of people not only familiar with Postgres
internals, but also in the new programming language; it
wouldn't make sense to switch to something like C++ and not
make full use of the language.I don't see how you think it will help. Most universities
(here in the US at least), are shying away from teaching
C/C++. So, in the long run, I don't see how that would
really help us get more developer involvement.--
Jonah H. Harris, Senior DBA
myYearbook.com--
Sent via pgsql-hackers mailing list
(pgsql-hackers@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, Sep 19, 2008 at 09:54:53PM +0200, Gevik Babakhani wrote:
Dear PG hackers,
Has there been any idea to port PG to a more modern programming
language like C++? Of course there are some minor obstacles like a
new OO design, this being a gigantic task to perform and rewriting
almost everything etc... I am very interested to hear your opinion.(You can take your M16 and start shooting now)
I won't get out the '16, but I *will* ask for some evidence in the
form of other projects of at least comparable size that have switched
languages successfully.
Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david.fetter@gmail.com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
On Fri, 19 Sep 2008 23:01:15 +0200
"Gevik Babakhani" <pgdev@xs4all.nl> wrote:
Unless I am very off. C++ is a natural choice when porting
(upgrading) ANSI C application.
As far as I know, most universities teach some sort of OO programming
language like JAVA or C# to help students understand OO programming.
I understand that C++ is less popular but JAVA/C# would be the wrong
choice for this.
I think the better question about all of this is:
What is the problem we are trying to solve?
Providing solutions that are looking for problems doesn't help us.
Sincerely,
Joshua D. Drake
--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
I think the better question about all of this is:
What is the problem we are trying to solve?
Providing solutions that are looking for problems doesn't help us.
Sincerely,
Perhaps the current codebase and design in C will serve us for years and
years to come. In fact there is no doubt about that and switching to an OO
design is no easy task. But times change and technologies evolve. So should
any software solution that is hoping to continue and compete with other
competitors of the same kind.
Procedural programming languages like C may have been languages of choice
for many years but they gradually loose developer audience just because of
the reason above. I am afraid PG is no exception here.
Show quoted text
Joshua D. Drake
--
The PostgreSQL Company since 1997:
http://www.commandprompt.com/ PostgreSQL Community
Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association:
http://www.postgresql.us/ Donate to the PostgreSQL Project:
http://www.postgresql.org/about/donate--
Sent via pgsql-hackers mailing list
(pgsql-hackers@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
All,
I don't see how you think it will help. Most universities (here in
the US at least), are shying away from teaching C/C++. So, in the
long run, I don't see how that would really help us get more developer
involvement.
Last I checked, we *weren't* having any problem recruiting developers. If
the project has a problem right now, it's dealing with the tremendous
output of the developers we do have. And infrastructure.
--
--Josh
Josh Berkus
PostgreSQL
San Francisco
Gevik Babakhani wrote:
I think the better question about all of this is:
What is the problem we are trying to solve?
Providing solutions that are looking for problems doesn't help us.
Sincerely,Perhaps the current codebase and design in C will serve us for years and
years to come. In fact there is no doubt about that and switching to an OO
design is no easy task. But times change and technologies evolve. So should
any software solution that is hoping to continue and compete with other
competitors of the same kind.Procedural programming languages like C may have been languages of choice
for many years but they gradually loose developer audience just because of
the reason above. I am afraid PG is no exception here.
A major problem I have with this suggestion is that PostgreSQL would
indeed be equivalent or better re-written in another language. All
PostgreSQL benchmarking and design decisions have been based upon
measuring the performance of PostgreSQL written in C for common
platforms. At it's most basic, if you were to do a strict 1:1
translation of PostgreSQL from C to Java, I feel confident in
guaranteeing that you will see a 10 times or more drop in performance.
Why? Because what is fast in Java is not the same as what is fast in C.
The design decisions would all need to be revisited, and the effect
would be exactly as already suggested - an immature design, competing
against other mature designs.
From C to C++ is only a smaller leap in the sense that pieces of
PostgreSQL could be migrated at a time. The result is still that an
OO-modelled PostgreSQL would be significantly different from a
procedure-modelled PostgreSQL, and you would always be facing the
compromise of: 1) Should re-write this part to be OO? or 2) Should we
leave it alone for now (and then, why bother using C++?).
Somebody working on a thesis or with thousands of hours of spare time
and no inclination to work on any other part, might prove that many of
the PostgreSQL technologies port well to another language - but it is
far more likely that the result will be a bust.
I'd rather core developer effort was spent doing what they are doing today.
Cheers,
mark
--
Mark Mielke <mark@mielke.cc>
Joshua Drake wrote:
On Fri, 19 Sep 2008 23:01:15 +0200
"Gevik Babakhani" <pgdev@xs4all.nl> wrote:Unless I am very off. C++ is a natural choice when porting
(upgrading) ANSI C application.
As far as I know, most universities teach some sort of OO programming
language like JAVA or C# to help students understand OO programming.
I understand that C++ is less popular but JAVA/C# would be the wrong
choice for this.I think the better question about all of this is:
What is the problem we are trying to solve?
Providing solutions that are looking for problems doesn't help us.
Sincerely,
Joshua D. Drake
fixing something that isn't broken is never a good idea. I see no
advantage switching to c++. Joshua is correct, what are you trying to
do that would require c++? If its OO design, well you don't need an OO
language for that.
C isn't going anywhere anytime soon. Look at its history, it has
survived its 'replacements' over and over again. The most popular
kernels, shells and applications are all still written in C (new and
old). Where are the warning signs that it is dwindling?
--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/
Gevik Babakhani wrote:
I think the better question about all of this is:
What is the problem we are trying to solve?
Providing solutions that are looking for problems doesn't help us.
Sincerely,Perhaps the current codebase and design in C will serve us for years and
years to come. In fact there is no doubt about that and switching to an OO
design is no easy task. But times change and technologies evolve. So should
any software solution that is hoping to continue and compete with other
competitors of the same kind.Procedural programming languages like C may have been languages of choice
for many years but they gradually loose developer audience just because of
the reason above. I am afraid PG is no exception here.
That's a two way street. I have far more experience in writing C than
C++. No doubt I could adapt, but it would certainly slow me down for a
while at least.
Frankly, this looks like a solution in search of a problem. When OS
kernels are all written in C++ I might accept that there is a good case,
but I see no sign of anything like that happening.
cheers
andrew
Thank you all for your opinion.
Show quoted text
-----Original Message-----
From: pgsql-hackers-owner@postgresql.org
[mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of
Andrew Dunstan
Sent: Saturday, September 20, 2008 12:53 AM
To: Gevik Babakhani
Cc: 'Joshua Drake'; 'Jonah H. Harris'; 'Dave Page'; 'PGSQL
Hackers'; heikki.linnakangas@enterprisedb.com;
david@fetter.org; josh@agliodbs.com
Subject: Re: [HACKERS] PostgreSQL future ideasGevik Babakhani wrote:
I think the better question about all of this is:
What is the problem we are trying to solve?
Providing solutions that are looking for problems doesn't help us.
Sincerely,Perhaps the current codebase and design in C will serve us
for years
and years to come. In fact there is no doubt about that and
switching
to an OO design is no easy task. But times change and technologies
evolve. So should any software solution that is hoping tocontinue and
compete with other competitors of the same kind.
Procedural programming languages like C may have been languages of
choice for many years but they gradually loose developeraudience just
because of the reason above. I am afraid PG is no exception here.
That's a two way street. I have far more experience in writing C than
C++. No doubt I could adapt, but it would certainly slow me down for a
while at least.Frankly, this looks like a solution in search of a problem. When OS
kernels are all written in C++ I might accept that there is a
good case,
but I see no sign of anything like that happening.cheers
andrew
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
I'm surprised no one pointed out that Postgres has *already* been ported
to a new language once. It was originally written in Lisp, and was
rewritten in C sometime in the Berkeley years. (Anyone know exactly
when or by whom? I don't.) You can still see the effects of that
origin in the system's liking for list-based data structures.
But the code base was an order of magnitude smaller and simpler back
then, meaning that a fresh port would be at least an order of magnitude
harder. Like other respondents, I'm not seeing where we'd get benefits
commensurate with the cost.
regards, tom lane
C isn't going anywhere anytime soon. Look at its history, it has survived
its 'replacements' over and over again. The most popular kernels, shells
and applications are all still written in C (new and old). Where are the
warning signs that it is dwindling?
To add to this:
It's easy to underestimate the effect that writing in almost anything
else has on performance. I once had a job working on a research
operating system written in C++. It was about 10x slower than
whichever flavor of BSD we were using at the time. There were a lot
of reasons for this, but I remember that overuse of heavy-weight
template classes was definitely one of them (not to mention a huge
source of code bloat). Ripping that logic out and replacing it with
something more, erm, C-like paid huge dividends.
There's no problem with using a higher-level language for your
application programming - I do almost all of my coding these days in
Perl or, as it happens, PL/pgsql. But you really don't want that
programming language to itself be written in another high-level
language. Core system components like your kernel and database and
compiler need to be fast, and it's pretty hard to get that in anything
other than C. You could probably make C++ do the job passably well,
but only if you avoid using some of the more inefficient language
features... in other words, only if you make it look as much like C as
possible.
...Robert