PostgreSQL 8.0 Released 556
Christopher Cashell writes "The PostgreSQL project has released version 8.0 of their well known Object-Relational Database. New features include: Win32 Native Server, Savepoints, Point-In-Time Recovery, Tablespaces, and lots more. Downloads are available via bittorrent for Unix/Linux, and the much anticipated Win32 version, or via ftp (use a mirror!)." (Here's the official announcement.)
Great (Score:5, Informative)
PGSQL has its own gotchas (Score:2)
For example, exceptionally poor performance of aggregates like COUNT(*), relatively weak optimizer.
See Wiki entry [wikipedia.org] for more.
Re:PGSQL has its own gotchas (Score:5, Interesting)
In PostgreSQL the gotchas are all about performance. And while it may be bad that the database crawls if I didn't schedule a job with vacuum and analyze, that does not have any long term effects. I just run the maintenance tasks manually, add them to a cronjob and I am good to go.
In MySQL however, the gotchas are mostly about data integrity. And that means that they can be disasterous because they can lead to dataloss. Unless you can explain to me how to get back whatever was silently truncated by MySQL if I discover the problems a few days later.
I do very much prefer PostgreSQLs focus on data integrity. But of course I actually read the manual so I won't be bitten by them in either database.
Re:PGSQL has its own gotchas (Score:3, Interesting)
Performance hasn't been an issue since at least version 7.
Re:PGSQL has its own gotchas (Score:5, Interesting)
I use PostgreSQL on a daily basis and when I change a database schema I will make sure that I run a VACUUM ANALYZE after committing the changes. But many of the people that we host don't bother to read the manual and don't do this. Usually this is no big deal because it gets picked up by the scheduled jobs. But every now and then somebody calls in a panic because their website is slow. And it always turns out to be major schema changes throwing the planner off. A quick VACUUM ANALYZE gets the performance up again and the customer is happy and has (hopefully) learned a valuable lesson.
This is a real gotcha in PostgreSQL. It has made a few of our customers' websites crawl for a few hours on occasion. But it has never caused dataloss.
Re:PGSQL has its own gotchas (Score:3, Informative)
No matter which version you use, if you never VACUUM dead row versions will accumulate and eventually kill your performance.
Actually, for 7.4 and newer that isn't true, since they include the aptly named "autovacuum" daemon. And yes, autovacuum also does "VACUUM ANALYZE", so no need to worry about that either.
Re:PGSQL has its own gotchas (Score:3, Funny)
Soon, 8.1 or so, it will be integrated into the backend. It almost made it into 8.0, but missed it by "" - that much.
Almost accurate (Score:4, Informative)
If you run enough transactions between vacuum runs (iirc a billion), the transaction counter will wrap around and suddenly your data does not have a consistant point of reference regarding visible transactions. Now, if you wait for a billion transactions to run VACUUM, you either:
1) Have extremely poor performance anyway (not to mention having all your stats off so the planner is doing seq scans when it should use an index)
2) Are doing something with the database which I cannot imagine (I guess a huge number of select statements could cause this, but updates cause old tuples to sit around, so you would have bad performance).
Now, I am not aware of this ever actually having happened, but it is in the documentation, so I figure I should point it out. Of course if you let the database get to this point, then you have bigger problems than your data (chief among them being the IT staff and/or management)..
In general, PostgreSQL focuses on data integrity to a degree not seen elsewhere in the open source database world. Even Firebird does not have such a heavy focus in this area, though to be fair it is a different enough product that their focus works well in their target markets.
My company offers application development, remote administration, and implimentation services for PostgreSQL, MySQL, and Firebird. I am very excited about this release because it will enable us to do more with the database manager which makes us most productive.
As a side note, PostgreSQL-Win32 will not run on Win9x because it requires an NTFS filesystem, iirc. So it is not a perfect solution for Windows development yet (until Win9x fades into the distance or until they decide that they should port it to FAT). Of course you could still use the Cygwin installation, I think. But it is better, IMO, to run it on a arguably stable system anyway.
Re:PGSQL has its own gotchas (Score:5, Interesting)
You've got to be joking about PostgreSQL having a weak optimizer. If it's weak, only the computer can tell.
Your Wiki link spent most of its space praising PostgreSQL for its advanced features, while your intent is clearly to denigrate it. If that represents PosgreSQL's worst facets, then I am very, very happy.
Re:PGSQL has its own gotchas (Score:3, Informative)
Re:PGSQL has its own gotchas (Score:5, Informative)
Postgres knows how many rows are in the table, but it does not know how many of those you can see. Some of them may be inserted speculatively by another transaction. Postgres needs to go through each row to determine whether or not that row is actually visible to you. It is possible to turn this into an O(1) operation if you're willing to do sufficient work on inserts and deletes. Whether this is a good tradeoff depends on how often you do count(*) compared to how often you do inserts and deletes.
Re:PGSQL has its own gotchas (Score:5, Informative)
That's really dumb. (Score:4, Informative)
You're telling me that MySQL locks the entire table when I insert a row? You must be joking - that would bring a database to it's knees.
I'm an Oracle guy, and this is how they do it:
Oracle has the best technology in the industry, hands down (DB2 didn't even get triggers until v5). Postgres appears to be paying much more attention to Oracle's methods than MySQL.
Guess which database I'd use if I had no money to spend?
Re:That's really dumb. (Score:3, Interesting)
Why do you think MySQL performs so poorly with large number of concurrent users?
Re:That's really dumb. (Score:5, Informative)
MySQL can use different "storage engines" for different tables. One of their older (and arguably, more widely deployed) engines in MyISAM, which does table-level locking (their newer engine, InnoDB, does row-level locking). From the MySQL Manual (sec 7.3.1) [mysql.com]:
and from Section 7.3.2 [mysql.com]:
This is one of the many problems with MySQL. I agree with you that Oracle (and PostgreSQL) are much better designed.
Re:PGSQL has its own gotchas (Score:3, Informative)
Re:Great (Score:3, Informative)
From http://www.mysql.com/company/legal/licensing/opens ource-license.html [mysql.com]
As for the link you provided, it seems to be a complaint about the habit of people to do business with proven, rather than unknown, vendors. It does mention MySQL, and says that it's license pages (not actual licenses, but pages talking about li
plperl (Score:3, Informative)
Re:plperl (Score:2)
Re:plperl (Score:2)
That's what the point-in-time recovery and tablespaces are about.
Re:plperl (Score:4, Insightful)
I'm not convinced. SQL is supposed to a standard, so you can move from one database server to another with not much effort. This is a big step away from that. Much like the features you'd find in Oracle or MS SQL.
Re:plperl (Score:2)
Re:plperl (Score:5, Informative)
First of all, SQL is supposed to be a sub-language used by other languages to access an RDMS. PL/Perl is a server side procedural language which allows you to write PgSQL functions in Perl. How standard is PL/SQL for Oracle? It's proprietary. In fact, Oracle and MS SQL are not entirely compliant with SQL 92 as they have their own extensions.
I'm impressed with SqLIte. (Score:3, Insightful)
For lite uses, and many heavy ones, SQLite [sqlite.org] seems excellent. I haven't used it yet, but whoever writes for the project is an excellent communicator.
In my experience, most open source projects, and almost all commercial products, have a (maybe mostly unconscious) plan: "We will carefully measure how much hassle people will accept, and make sure we don't document anything more than enough to just barely keep people from rejecting us."
It's common to visit an open source project and find that, yes, they h
Magical upgrade needed (Score:5, Insightful)
Converting 200Gb of data is not something you want to try do without downtime.
All that said, it's good to see PostgreSQL always improving. Good one guys.
Re:Magical upgrade needed (Score:3, Informative)
-Dom
Re:Magical upgrade needed (Score:2)
Even though I can feel your pain I' d like to ask a question: Do you know of any database (free or commercial) that supports such a feature (auto)magically?
See, I thought not.
Migrating a data server to a new major release is a pain by definiton and while you might be able to trick the users into believing
Re:Magical upgrade needed (Score:3, Informative)
yes : this one [postgresql.org]
see http://slony.info/ as the other poster mentioned
Re:Magical upgrade needed (Score:2)
I am curious about the query optimizer and understanding what sort of improvements may have been mad
I didn't read the article... (Score:2)
Does is have a native Microsoft SQL Server import feature?
The thing is, getting a plain SQL dump out of MS SQL Server isn't possible with version 2000, haven't checked since then though. I'm sure this is a deliberate thing tough...
Re:I didn't read the article... (Score:3, Informative)
Re:I didn't read the article... (Score:2)
Off the top of my head snagging their MS SQL to MySQL converter might do the trick for you?
Hope that helps a little...
Re:I didn't read the article... (Score:2, Informative)
DTS can pump your MS-SQL-database into postgresql with little problem i'd expect. Now getting the logic (triggers, functions) transferred is a whole other question.
Siggy.
Re:I didn't read the article... (Score:2)
It can be done, just isn't as obvious as people would like.
Secondly Version 2000 is the latest version of MS SQL Server.
Erm? (Score:2)
Re:Erm? (Score:5, Informative)
Re:Erm? (Score:2)
Re:Erm? (Score:4, Informative)
PostgreSQL offers substantial additional power by incorporating the following additional concepts in such a way that users can easily extend the system:
Other features provide additional power and flexibility:
These features put PostgreSQL into the category of databases referred to as object-relational. Note that this is distinct from those referred to as object-oriented, which in general are not as well suited to supporting traditional relational database languages. So, although PostgreSQL has some object-oriented features, it is firmly in the relational database world.
Re:Erm? (Score:3, Informative)
Congratulations to all involved (Score:2)
Apart from the initial learning curve, I have exactly zero complaints with postgres - it always does exactly what it says it will. I have no qualms trusting vital data to it. Combined with the excellent pqxx [pqxx.tk] c++ bindings library you can build robust applications with very tightl
Web Server Difficulties (Score:5, Informative)
Please take it easy on 'wwwmaster'.
'www' fell over a couple of hours ago, and a couple of mirrors are coming online to round-robin the address.
Can someone please change the the first link ("PostgreSQL project") in the story to point to 'www'?
Thanks.
I've been waiting for this (Score:5, Informative)
For those of you wanting a great frontend, try PGAdmin3 [pgadmin.org]. It works on Win32 and Linux.
Vital Data (Score:3, Funny)
It's up to about 600 records now and although I wouldn't say it's mission critical it certainly is vital.
I have to say I'm extremely impressed with pgsql. It's easy to use and consistent in what it does. I have no complaints whatsoever. What I like most (although I'm not sure this is exclusive to pgsql) is the fact that I can at any time get a plain text dump of everything in the database in a format that makes sense. If the worst comes to the absolute worst, I can always mess around with awk and write a script which can convert a pg dump to another format. It gives me piece of mind that my data can always be read.
I've heard that ms sql users are not so fortunate - ie no plain text dumps. Correct me if I'm wrong.
Kudos to the pgsql team for such a fine product and keep up the good work!
correcting you if you're wrong ;-) (Score:2)
SQL Server may have some missing functionality, but plain text dumps work perfectly well (albeit you might need to do them one table at a time). They're also incredibly simple to do.
Most of Microsoft's products may be crap, but SQL Server does seem to be an exception to the rule. All in all it works pretty well in my experience. However 9/10ths of SQL Server deployments would probably be just as well off with PostgreSQL. :-)
Re:correcting you if you're wrong ;-) (Score:3, Informative)
How does it compare to Oracle? (Score:2)
Re:How does it compare to Oracle? (Score:5, Informative)
There is no clustering support in PostgreSQL (and I mean real clustering, not some Java hack where transactions are shipped off to two separate DB servers, both of which don't know they're part of a cluster). This is pretty much a show stopper as far as using PostgreSQL in the company I work for, as high availability is a large concern, and any downtime would be serious.
In previous versions of PostgreSQL, the pg_dump and pg_restore tools were not very good - dumps that included tables or views often would fail on reimport because PostgreSQL wouldn't know the order in which to import everything. You also had to pass in a number of options on the command line just to get a dump that made sense, and large object support was kind of clunky.
That said, I still use PostgreSQL for many many projects and have used PostgreSQL for many years. It's a great product, but it isn't near Oracle in terms of enterprise level features.
Re:How does it compare to Oracle? (Score:3, Informative)
http://www.slony.info/
Re:How does it compare to Oracle? (Score:2)
From that perspective, PostgreSQL performs within 5% either way of Oracle for me in pretty much all cases, save one:
PostgreSQL performs much worse if I didn't create an index I needed. Oracle will automatically index based on queries that are run - this can yield HUGELY better performance if you screw up and don't create your physical model to support how you use the database in your applica
Re:How does it compare to Oracle? (Score:2)
Re:How does it compare to Oracle? (Score:2)
It must be the sane choice for big corps. In my workplace, we develop for oracle, and postgres, and we are very pleased with both performances.
Programming for postgres is nicer, because they are more conformant to standars (the version of ORacle we are using doesn't have "LIMIT" and "OFFSET", for example). Administering it is easier, backups/restores are easier, mirroring is easier.
Re:How does it compare to Oracle? (Score:5, Informative)
But there are many other, more demanding databases that postgresql isn't yet ready for. Oracle, DB2, and even SQL Server 2005 all have very mature & solid: optimizers, replication, partitioning solutions, parallelism, failover/clustering support, etc.
Here are two examples:
Using db2 for example, you can create a view which is automatically populated by the database like a table (MQT). Then any queries against the base tables that could be sped up by hitting this view will be rewritten by the engine to hit the view. Now, this might seem like needless fluff if you're just writing a hobby php app. But if you need to implement a commercial app like SAP with its 6,000 tables - and you have performance issues - you can make adjustments in the database layer this way. Also, if you're provoding adhoc reporting for hundreds of users on a terrabyte of data - this technique can provide *dramatic* performance benefits.
Another example is partitioning. Back to db2 (which I work with the most): you can spread a database across a dozen separate servers using a hashkey. Now, every query will have all dozen servers working independently on its own fraction of the data. On each of those servers, you can then partition again, this time using ranges or values (MDC) - so that data that doesn't apply to a query will be skipped in tablescans of that table. Using these techniques you can get sub-second response to *adhoc* queries against a terrabyte of data - without indexes (notoriously unreliable here).
Lots more examples where the above came from. Sure, you will pay real money for licensing, hardware, and labor to implement these. Then again, the two above features actually save you in hardware costs. Additionally, some problems are big enough that they can easily justify the cost of licensing a product like this. I've seen these techniques used to save companies million, even hundreds of millions of dollars.
congrats (Score:2)
Mac OS X support? (Score:2)
One thing I'm not keen on though is tarball distributions. I don't want to have to compile the thing, I just want to grab a package for my platform and install it (just like I do with MySQL).
My favoured platform though is Mac OS X. There's a whole list of platforms in the FAQ, but Mac isn't amongst them.
So my questions are is Mac OS X supported, and if so are there any plans to make a Mac OS X
Re:Mac OS X support? (Score:3, Informative)
The question remains though - are there plans for a Mac OS X installer package?
Re:Mac OS X support? (Score:3, Informative)
Re:Mac OS X support? (Score:2, Informative)
Re:Mac OS X support? (Score:2)
*If you want to support more connections or more shared memory per connection, you need to set your sysv shm settings in
Here's what I'm currently u
Re:Mac OS X support? (Score:4, Informative)
7.x compiles right out of the box- in fact, Apple's Remote Desktop system actually installs and uses PostgreSQL for all its data storage (client system data and whatnot; ARD can collect a lot of per-system data). Very slick.
Java Stored Procedures? (Score:2, Interesting)
Typical (Score:2, Interesting)
Looking good! (Score:2, Interesting)
Two more features... (Score:5, Interesting)
... and it would really really rock!
Said that, PostgreSQL is a really great thing, and being FOSS, I could of course always go ahead and add the named features... .)
Use Slony for replication (Score:3, Informative)
Check out the new Slony replication engine:
http://www.slony.info/ [slony.info]
It is probably the best master->slave data replication engine for PostgreSQL at the moment. It is free and developed by one of the core developers.
Postgres-R (Score:3, Funny)
Well, the gig was up after everyone figured out that Postgres-R was just Postgres with a big muffler and wing.
Re:Two more features... (Score:5, Informative)
For the second request, keep a close eye on the mailinglists. Affilias has hired a core developer to make it happen.
The first stage, master-slave replication, has been released in the form of Slony-1. Yes, it is an add on. No, it is not integrated. But you can add Slony-1 to a running system and add slaves without ever taking the master down, and it is backwards compatible so you can even use it to upgrade running 7.3.x installations to PostgreSQL 8.
The second stage, Slony-2, will be a full multi-master replication solution. (I read something about a 'kickoff' meeting today hosted by Affilias.) The goal is to be able to take a single, out of the box installation of PostgreSQL, plug Slony-1 into it, replicate the database to another box and when that box has caught up switch to full multi-master mode under Slony-2.
The code won't fall out of the sky tomorrow, but people are working on it.
An OOP DB (Score:2)
Yes! 8.0 - I have been waiting (Score:2)
Especially the ability to ALTER TABLE "x" RENAME TO "Y"; (!)
Yes mySQL has been able to do this for a while, I got sick of exporting out the data and re-importing, but now we dont have too!
It might be also a good time to mention that EMS have released Lite versions of their product that are free. (pgsql, mysql, mssql and interbase)
Re:Yes! 8.0 - I have been waiting (Score:2)
I meant to say changing a column type.....
It's easier to install and admin than mysql (Score:5, Insightful)
I have worked with self-educated programmers who did not know how to do simple table joins or even modestly complex SQL queries or transactions, because they had learned what they thought was SQL by using Mysql. There is a whole generation of developers who now think that transactions aren't really necessary in a database application.
Postgres is really an Oracle killer at this point, and I know, having used Oracle. There is quite simply no reason to use any other relational database at this point, especially to back a live web site.
Re:It's easier to install and admin than mysql (Score:3, Insightful)
I don't know that PostgreSQL is an Oracle killer yet. Maybe for a single server/single database solution. But for mission-critical enterprise apps that need 100% uptime (4 nines anyway), you have to have active-active databases, backups while the app is r
Re:It's easier to install and admin than mysql (Score:4, Informative)
Re:It's easier to install and admin than mysql (Score:3, Interesting)
I'd be careful with statements like this. Postgres competes well with Oracle for a variety of applications. However, Oracle still has some VLDB and high availability features that aren't yet available for Postgres. Also, for a lot of folks, what matters isn't the database, but stuff like the availability of
awesome (Score:2, Insightful)
And my favorite features are (Score:3, Informative)
1) GIS support. Very important for what I do. This is probably due to how closely they work with GRASS (which I haven't used yet).
2) Ability to define and bind operators. Very flexible.
3) Much more relationally compliant while also supporting OOP.
4) PGAdmin II is very handy. A few rough points but now there is no excuse for those afraid of a command line.
It just gets better every release. I am currently porting a MMSQL database over and so far so good.
the Oracle comparison (Score:5, Insightful)
It is not a very meaningful comparison, though. Oracle also has a lot of stuff that nobody would be happy to see tacked on to PostgreSQL. Oracle is notoriously difficult to administer. The download of Oracle's database product is probably 500 times larger than PostgreSQL. (and 20 times larger than Oracle itself was just a few versions ago, which is interesting, and yes I'm guesstimating but still...)
In short, PostgreSQL doesn't need all the features of the Oracle db to be successful, as *nix and NT did not need all the features of a mainframe OS to be successful.
Replication (Score:3, Interesting)
I miss PostgreSQL, but too many things are made easier by replication.
Change Column Types - finally (Score:3, Informative)
Before, to do this, you had to create a temporary table with the changed column type, copy all the data over to it, and then rename the temp table as the old table.
Thank you Postgres team! Now, if we can rename a column, that would be a nice bonus.
It looks like a great year for PostgreSQL (Score:4, Informative)
Oxford University announced a while back that they will be scrapping most of their proprietary DBs for PostgreSQL over the course of '05:
http://news.zdnet.co.uk/software/applications/0
What's New in 8.0 (Score:5, Informative)
Not only that. Here's the most important link: What's New in 8.0 [postgresql.org]. (To editors: why there are links to torrents, but no link to features?)
Or LAPP (Score:5, Insightful)
Linux + Apache2 + PostgreSQL + Python == kickass webserver
Re:Or LAPP (Score:3, Insightful)
Re:Finally (Score:2)
You have evaluated them both in production environments where data integrity is paramount and developer time is expensive ?
Re:Finally (Score:3, Insightful)
And the data is not really mission-critical. It's just a bunch of numbers (exchange rates, stock prices) aggregated from various places. Database crash? Just repopulate by querying the various data sources.
Re:Finally (Score:3, Informative)
Really, I don't mean to be mean, but of course it is. That's one of the purposes of replication.
MySQL is perfect for this. I agree, I've had a tremendous amount of success with this type of scenario.
And the data is not really mission-critical
So it should be no problem for Jeremy Zawodny to convince Senior Management of this newfound piece of information? I'd have to say he or anyone else would have a really friggen hard time convincing anyon
Re:Finally (Score:4, Interesting)
Re:Finally (Score:2)
Perhaps, except that it is n* times better. I've run some pretty intense, badly-written db-abusive e-commerce sites (we are talking $5 million per year in cash flow) using MySQL without problems.
* Footnote: n = number of protons in the universe, around 10^40.
Re:Finally (Score:2, Insightful)
Re:Finally (Score:3, Funny)
> Perhaps, except that it is n* times better. I've run some pretty intense, badly-written db-abusive
> e-commerce sites (we are talking $5 million per year in cash flow) using MySQL without problems.
Hmmm, but wouldn't it be better to use a database that doesn't silently truncate numbers so that you could be a $50 million per year company instead?
Re:Finally (Score:2)
I figure it's similar to how people beleive that OS X is the best thing to ever happen to modern computing since Windows 95, even though a vast majority of OS X lovers never used it for anything other then a desktop or a toy for any length of time.
Well, OS X is great. Its a UNIX OS with a decent GUI. Not often seen
Feel free to mod offtopic
Re:Finally (Score:3, Insightful)
Re:Win32? (Score:3, Insightful)
Re:Win32? (Score:3, Insightful)
Myself, I'm absolutely thrilled wiht this new release (and indeed, their new website -- the old one did look a bit naff). I expect PostGreSQL's popularity to increase a fair bit this year, and good luck to them!
Re:Win32? (Score:2)
I expect this to take more of MSSQL's market share on the Windows space...for organizations that can't yet stop using Windows, but don't want to shell out for a database if they don't have to.
Re:Win32? (Score:2)
Re:Replication and vacuum? (Score:2)
Yes, you can vacuum your tables without locking them.
Re:Replication and vacuum? (Score:4, Informative)
Master-Slave replication is available through Slony1 [postgresql.org]. (This is currently used by Afilias on the .info domain) Slony2 is in progress and will provide multi-master replication.
Vacuuming is still necessary, but it no longer locks tables. The distribution includes a utility called pg_autovacuum which can take care of all the vacuuming tasks on an automated basis if you desire. (The gentoo release automatically installs this with a nice init script :) )
Re:Gotchas (Score:2)
some of those mysql look really nasty
the postgres ones look fairly innocuous, esp. for recent versions
Re:Their database server is down (Score:3, Insightful)
Re:Related Objects (Score:3, Interesting)