Slashdot Mirror


PostgreSQL 8.0 Released

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.)

75 of 556 comments (clear)

  1. Great by Anonymous Coward · · Score: 5, Informative

    Great, but why should I use PostgreSQL when I already have a database, you might ask? Here's why.

    1. Re:Great by ultranova · · Score: 2, Informative

      Not to mention, MySQL is not Open Source.

      From http://www.mysql.com/company/legal/licensing/opens ource-license.html

      Our software is 100% GPL (General Public License); if yours is 100% GPL compliant, then you have no obligation to pay us for the licenses.

      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 licensing) "suggest" that you should get a commercial license for in-house software involving MySQL. It also implies that the GPL is vulnerable to "radical interpretation", whatever that means, and hints of ominous things that might happen if open source companies are acquired by HP, IBM or Oracle - not to mention the secret desire of RedHat: "To gently push me into a network of interlocking software and hardware components all under the same brand name" - does RedHat even make hardware ?

      In short, genral FUD piece.

      Or, even if it is technically open source, if you use it in any commercial application you have to pay.

      It is open source, on the grounds that the source code is available. It is free open source, on the grounds that the source code is available under an open source license (GPL). As usual, you cannot join GPL'd and proprietary code, unless you manage to get a license that allows this from the copyright holder of the GPL'd code.

      Please explain this technicality you speak of.

      You're even supposed to pay for each copy of MySQL used by developers of commercial applications on their development machines.

      If you redistribute MySQL in-house in a way that violates the GPL, you will need to get a commercial license, since you cannot use the GPL since you just violated it. How is this different from any other product ?

      That's not the kind of Open Source software I'm interested in.

      Fine, don't use it then. But please don't spread FUD about it.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  2. plperl by michaelhood · · Score: 3, Informative

    One of the most exciting features of 8.0 is plperl, their Perl-based server side language, allowing for triggers and persistent storage. On another note, I wish MySQL would catch up to PgSQL. Even if you don't like MySQL, the competition keeps them innovating. If PgSQL is light years ahead, what's pushing them?

    1. Re:plperl by StrawberryFrog · · Score: 3, Insightful

      One of the most exciting features of 8.0 is plperl, their Perl-based server side language

      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.

      --

      My Karma: ran over your Dogma
      StrawberryFrog

    2. Re:plperl by AhBeeDoi · · Score: 4, Informative
      One of the most exciting features of 8.0 is plperl, their Perl-based server side language

      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.

      Hardly.

      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.

  3. Magical upgrade needed by inflex · · Score: 4, Insightful

    Now all I need is a magical installer which will convert my existing 7.2.4 systems to 8.x without missing a single beat or disrupting the existing programs written against the old libs.... I'm serious!

    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.

    1. Re:Magical upgrade needed by Dom2 · · Score: 2, Informative
      You need to look at setting up a second system and running slony-I.

      -Dom

    2. Re:Magical upgrade needed by DrSkwid · · Score: 2, Informative

      Do you know of any database (free or commercial) that supports such a feature (auto)magically?

      yes : this one

      see http://slony.info/ as the other poster mentioned

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  4. Web Server Difficulties by Reality_X · · Score: 5, Informative

    Hi Folks,

    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.

  5. I've been waiting for this by wackysootroom · · Score: 4, Informative

    Goodbye Oracle, hello PostgreSQL. Now I can have a mostly SQL92 compliant database with ACID, transactions and now PITR and tablespaces that I can use on the server and on a win32 desktop.

    For those of you wanting a great frontend, try PGAdmin3. It works on Win32 and Linux.

  6. What's New in 8.0 by Pan+T.+Hose · · Score: 5, Informative

    An adequate replacement for MySQL on Windows. Can anyone say WAPP instead of LAMP?

    Not only that. Here's the most important link: What's New in 8.0. (To editors: why there are links to torrents, but no link to features?)

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  7. Re:I didn't read the article... by Mark+Imbriaco · · Score: 2, Informative

    PostgreSQL has had an ODBC driver for quite some time. You could use that in conjunction with SQL Servers DTS tools to copy data from a SQL Server DB to Pg. There might be some pain involved, particular with indices and constraints, but it shouldn't be too awful.

  8. Re:Win32? by Quill_28 · · Score: 2, Insightful

    I didn't know the goal of Postgresql was to rid the world of windows.

  9. Vital Data by _Hellfire_ · · Score: 2, Funny

    I wrote a PHP program that tracks my gf's and I's finances with a Postgresql database backend.

    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!

    --
    "And then I visited Wikipedia ...and the next 8 hours are a blur..."
  10. Re:Win32? by Zaiff+Urgulbunger · · Score: 2, Insightful

    It may, but it really helps for folks who use Windows and want to run a local copy of their database for development purposes.

    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!

  11. Re:Erm? by Erik+Hensema · · Score: 4, Informative
    In PostgresQL you can make a table inherit parts of another table. This is what's meant by object relational. Example (from the docs):
    CREATE TABLE cities (
    name text,
    population float,
    altitude int -- (in ft)
    );

    CREATE TABLE capitals (
    state char(2)
    ) INHERITS (cities);
    --

    This is your sig. There are thousands more, but this one is yours.

  12. Re:Mac OS X support? by Archibald+Buttle · · Score: 2, Informative

    To answer the first part of my question, I just found the Supported Platforms part of the manual, and sure enough Mac OS X is there.

    The question remains though - are there plans for a Mac OS X installer package?

  13. Re:Erm? by Delirium+Tremens · · Score: 3, Informative
    From http://www.postgresql.org/docs/7.3/interactive/use r-preface.html:

    PostgreSQL offers substantial additional power by incorporating the following additional concepts in such a way that users can easily extend the system:

    • inheritance
    • data types
    • functions

    Other features provide additional power and flexibility:

    • constraints
    • triggers
    • rules
    • transactional integrity

    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.

  14. Re:Erm? by quigonn · · Score: 2, Informative
    --
    A monkey is doing the real work for me.
  15. Re:Mac OS X support? by DrZZ · · Score: 2, Informative

    This guy usually isn't too far behind in creating .pkg for the stable PostgreSQL releases. I have run it on OS X for a number of years and I have been very happy with it.

  16. Java Stored Procedures? by SQLz · · Score: 2, Interesting

    What happened to the big news about the Java stored prodcedures? Wasn't there some news not to long ago about adding support for this in Postgres? To me that would been a more welcome feature than the rest of the stuff.

  17. Typical by Anonymous Coward · · Score: 2, Interesting

    I hate it when MySQL fanboys jump into threads like this only to show their ignorance of relational algebra and predicate calculus saying that no one should ever bother with PostgreSQL and ACID-compliance, because MySQL is somehow a "better tool for the job" in the "real world". We already have comments saying that, so people, please read this first: [1] [2] [3] [4] [5] [6] [7] before you post yet another misleading plug for your favorite toy. Thank you. A real relational database is more than just a data store with SQL frontend.

  18. Re:How does it compare to Oracle? by nemesisj · · Score: 4, Informative

    It's got a long way to go as far as enterprise features.

    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.

  19. Re:Mac OS X support? by larkost · · Score: 2, Informative

    The standard way of finding MacOS software would have answered this question in a heartbeat: VersionTracker or MacUpdate, both of which list installers.

  20. Re:I didn't read the article... by SiggyRadiation · · Score: 2, Informative

    If you want to migrate away from SQL-Server then you have MS DTS (at least for the time being).

    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.

    --
    This unique sig is intended to make this user more recognisable.
  21. Or LAPP by Quattro+Vezina · · Score: 4, Insightful

    LAPP, maybe, but certainly not WAPP.

    Linux + Apache2 + PostgreSQL + Python == kickass webserver

    --
    I support the Center for Consumer Freedom
    1. Re:Or LAPP by jadavis · · Score: 2, Insightful

      A brighter LAMP: Linux Apache Middleware PostgreSQL

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  22. Looking good! by unixMafiA · · Score: 2, Interesting

    Good to see they're back in the race, coming up with something serious - and Thanks, Oracle! for being a tough competitor providing a solid standard to keep up with. PostgreSQL is, in my opinion, the most presentable of not-too-much-$ database solutions, I sure like to present clients with a new version of P rather than the crummy image of MySQL (by no means an inferior product but not profiled in the same, serious way). Ah and let's see how it runs on Mac OS/X - Darwin, too. Maybe my little 12" will become all the more a p0w4hful tool because of it - and it had better, I haven't paid the thing off, yet! ...

    --

    * Signal 15... "Ceterum censeo Microsoftem esse delendam." Cheers cq. BRgds: DrS aka UNIXmafia@ribeco.net
  23. Re:Replication and vacuum? by IsleOfView · · Score: 3, Informative
    Yes and Yes.

    Master-Slave replication is available through Slony1. (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 :) )

  24. Two more features... by teqo · · Score: 4, Interesting

    ... and it would really really rock!

    • Hot tablespace-based backups, combined with write-ahead log backups, as seen in Oracle since version 8 (or even 7?) This is an extremely nice feature when you have large databases and no chance for regular scheduled downtime and still want backups, both complete and incremental ones. Compared to the export-based feature of PostgreSQL, it would put way less load onto the server, because tablespace-based and WAL-based backup bypasses the SQL engine, so it is copying a (for example) 200 GB files vs. 200 GB query-based export
    • Better and more integrated replication. There are a number of independent projects that want to create replication add-ons, like pgreplication and the older, more academic Postgres-R, but that's not really production quality so far. According to some consultant that is working tightly with PostgreSQL and the developers, they are working on it, but he was really hedging when asked about advanced features and was theorizing how practically impossible and/or expensive multi-master realtime replication would be... An optional feature for many users, granted, but still something you might want for scaling beyond certain limits.

    Said that, PostgreSQL is a really great thing, and being FOSS, I could of course always go ahead and add the named features... .)

    1. Re:Two more features... by JohanV · · Score: 4, Informative

      Most of your first request is already implemented in PostgreSQL 8. You can combine a hot backup of the files on the filesystem with the WAL-archiver to have the backup feature you want. It is not per tablespace (yet) so you have to backup your entire database.

      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.

  25. Re:PGSQL has its own gotchas by JohanV · · Score: 4, Interesting

    I would consider the PostgreSQL gotchas to be of an entirely different category as the MySQL gotchas.
    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.

  26. Use Slony for replication by chriskl · · Score: 3, Informative

    Check out the new Slony replication engine:

    http://www.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.

  27. Re:Finally by GuyWithLag · · Score: 3, Interesting

    In my last project I was forced to use MySQL due to hosting issues. I still believe that MySQL is the Access of the OSS dtabases (in a non-GUI way).

  28. It's easier to install and admin than mysql by hqm · · Score: 4, Insightful

    The dirty secret is that Postgres is actually easier to install and administer than mysql. I don't want to get into a religious argument with mysql users but ... oh hell yes I do.

    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.

    1. Re:It's easier to install and admin than mysql by Arkham · · Score: 2, Insightful

      It's just a shame that PHP doesn't include the same level of support for PostgreSQL as they do for MySQL. I like PostgreSQL very much, but whenever I look into the capabilities of a client's hosting facility, they always have MySQL and never PostgreSQL.

      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 running, etc. This release is a huge step in the right direction, but Oracle isn't replaceable just yet.

      --
      - Vincit qui patitur.
    2. Re:It's easier to install and admin than mysql by DigitalRaptor · · Score: 3, Informative

      Threads have to do solely with 3rd party plugins, not with PHP itself. PHP5 is completely thread safe.

      --
      Lose Weight and Feel Great with Isagenix
    3. Re:It's easier to install and admin than mysql by randall_burns · · Score: 2, Interesting
      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.


      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 financial packages. There is also a lot of inertia with Oracle-that could be handled by creating libraries that give Postgres a higher degree of API and language compatibility with Oracle. I'm rooting for Postgres-but Postgres has a ways to go before Oracle is truly dead.

  29. Postgres-R by SuperBanana · · Score: 2, Funny
    There are a number of independent projects that want to create replication add-ons, like pgreplication [postgresql.org] and the older, more academic Postgres-R, but that's not really production quality so far.

    Well, the gig was up after everyone figured out that Postgres-R was just Postgres with a big muffler and wing.

  30. awesome by idlake · · Score: 2, Insightful

    Some people say that providing open source applications on Windows helps proprietary software and the Windows monopoly, but I don't think so. Software like Apache, PHP, PostgreSQL on the server, and Mozilla Firefox, Thunderbird, and OpenOffice on the client lets Windows users gradually move over to open source applications. I think that's a much better way of getting people to switch than to ask them to do an all-or-nothing switch.

  31. Re:PGSQL has its own gotchas by StormReaver · · Score: 4, Interesting

    I have several tables with over 3 million rows, and most aggregates return immediately (or nearly immediately). count(*) is the only dog since it reads every row to get the count, but it's acceptable since I rarely count all rows in the table. I've often wondered why the developers couldn't keep an internal count of all active rows, so count(*) would return immediately, but I'm sure they have their reasons.

    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.

  32. Re:Their database server is down by cloudmaster · · Score: 2, Insightful

    Don't they know that MySQL is the one to use for web backends? :)

  33. Re:Finally by pebs · · Score: 2, Insightful

    Saying MySQL is better than Access is not saying much. MySQL may be excellent when it meets the requirements, but there are a lot of cases where it simply does not.

    --
    #!/
  34. Re:Mac OS X support? by SuperBanana · · Score: 3, Informative
    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 .pkg installation file?

    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.

  35. I'm impressed with SqLIte. by Futurepower(R) · · Score: 2, Insightful


    For lite uses, and many heavy ones, SQLite 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 have a new version, but the manual is two years old. There are plenty of commericial projects that are the same way, like Netgear's FVS318. Their reference manual is for version 1.4, but the latest version is 2.4.

    An advantage of open source projects is that they are usually far more honest than commercial projects. I love this from the PostgreSQL What's New page: "Although tested throughout our release cycle, the Windows port does not have the benefit of years of use in production environments that PostgreSQL has on Unix platforms and therefore should be treated with the same level of caution as you would a new product." Marketing people are generally so dishonest that they would not allow an honest statement like this.

    MySQL is a non-standard implementation of SQL. That's a problem that's probably partly caused by not doing good documentation. If they had documented everything as they wrote MySQL, they might have seen what a mess they were making. Bad documentation obscures programming messes.

    PostgreSQL has an elaborate documentation system, and the new features are very impressive.

  36. Re:PGSQL has its own gotchas by Hammer · · Score: 2, Informative

    Another garage product also fares badly on COUNT(*) however if you do COUNT() they both do real well. It has to do with the fact that when you do COUNT(*) you have to count every row and that takes a fair bit of time. When you do COUNT(key) you count rows in the index file and that is real quick :-)

  37. Re:PGSQL has its own gotchas by jedidiah · · Score: 2, Informative

    If your RDBMS is doing a full table scan just to do a count(*), then it (or your code) is badly broken.

    --
    A Pirate and a Puritan look the same on a balance sheet.
  38. Re:PGSQL has its own gotchas by Cajal · · Score: 5, Informative

    In MySQL (with MyISAM tables), the reason things like count(*) are fast is that MyISAM pre-computes those values. It can do this because it locks the table on insert and update. PostgreSQL doesn't lock the table on modifications -- it allows concurrent access via Multi-Version Concurrency Control (MVCC). Basically, each row in the DB has additional information (used internally by PostgreSQL), which stores which transaction created and last modified the row. PG uses this to determine if any given row should be "visible" to the current transaction. Because this informaiton is constantly changing (and varies from transaction to transaction), you can't precompute things like count(*) and sum(*). See http://developer.postgresql.org/pdf/internalpics.p df for more info (start around page 56).

  39. Re:correcting you if you're wrong ;-) by mborland · · Score: 2, Informative
    You're probably referring to BCP or a similar function, which dumps a single table of data at a time to a text file in a specified format. What the original poster is probably referring to is the ability to dump a database into an SQL script that, when run, completely re-creates the schema, data and other features of the database. It's a very simple backup/restore mechanism and makes various conversions and other operations much easier.

  40. Re:How does it compare to Oracle? by kpharmer · · Score: 4, Informative

    Postgresql is ready to take on the smaller, non-critical databases that oracle used to get. This is significant proportion of the databases out there, and will take revenue away from oracle. (Mysql will actually probably take more revenue away, but it has too many quality problems and functionality gaps to really deserve to.)

    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.

  41. Re:PGSQL has its own gotchas by amorsen · · Score: 4, Informative
    If your RDBMS is doing a full table scan just to do a count(*), then it (or your code) is badly broken.

    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.

    --
    Finally! A year of moderation! Ready for 2019?
  42. And my favorite features are by plopez · · Score: 2, Informative

    playing around with the beta and RCs several items impressed me:

    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.

    --
    putting the 'B' in LGBTQ+
  43. the Oracle comparison by justins · · Score: 4, Insightful

    Oracle will always have more features than any other given database product you care to compare it to, and there will always be those who find some of those Oracle-unique features irresistable. That's what it means to be the central product of a very large, wealthy and reasonably effective software company.

    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.

    --
    Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
  44. Re:Related Objects by danharan · · Score: 2, Interesting

    Seems to me Hibernate is the closest there is in that field. IIRC its lead is now working on EJB3 specs. It's a Jboss project, and I've used it with Tomcat without problems.

    --
    Information: "I want to be anthropomorphized"
  45. Re:PGSQL has its own gotchas by Dan+Ost · · Score: 2, Interesting

    Have you used PostgreSQL recently?

    Performance hasn't been an issue since at least version 7.

    --

    *sigh* back to work...
  46. Re:Finally by kpharmer · · Score: 2, Funny

    >> I still believe that MySQL is the Access of the OSS dtabases

    > 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?

  47. Re:How does it compare to Oracle? by chriskl · · Score: 3, Informative

    Try Slony for full, production quality replication on PostgreSQL:

    http://www.slony.info/

  48. Replication by dmadole · · Score: 2, Interesting

    If only a simple and integrated replication mechanism would appear, I would consider switching back to PostgreSQL from MySQL.

    I miss PostgreSQL, but too many things are made easier by replication.

    1. Re:Replication by rkit · · Score: 2, Informative

      Did you already take a look at slony?
      http://gborg.postgresql.org/project/slony1/projdis play.php

      --
      sig intentionally left blank
  49. Re:PGSQL has its own gotchas by JohanV · · Score: 4, Interesting

    Performance is still an issue when you don't read the manual and never perform maintenance on your database. No matter how good the planner is, if it doesn't have acurate statistics because nobody ever runs ANAYZE your database will crawl. No matter which version you use, if you never VACUUM dead row versions will accumulate and eventually kill your performance.

    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.

  50. Re:PGSQL has its own gotchas by joib · · Score: 2, 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.

  51. Re:Finally by davegaramond · · Score: 2, Insightful

    Unfortunately, many (quite a large percentage) of applications running MySQL *do* need MySQL features that don't exist in SQLite. Full text indexing, for one, which is utilized by many Forum web app.

  52. Re:Finally by davegaramond · · Score: 2, Insightful

    I also suspect the master data is stored in a different place (either in another MySQL machine or other DB). So the MySQL machines that serve finance.yahoo.com are basically for read-only simple queries (but involve lots of rows). MySQL is perfect for this.

    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.

  53. Re:PGSQL has its own gotchas by Sxooter · · Score: 2, Funny

    But the autovacuum daemon isn't enabled or even compiled by default. You have to go into contrib, compile and install it, and then turn it loose.

    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.

    --

    --- It is not the things we do which we regret the most, but the things which we don't do.
  54. Re:MySQL and Postgres by Martin+Foster · · Score: 2, Informative

    I switched a an open-source project from MySQL to PostgreSQL a year or so back. The application of proper transactions, referential integrity, views and stored procedures really cleaned up the code.

    However, PostgreSQL is not necessarily the easiest DBMS to get used to. For one, some platforms such as *BSD will require a recompile of the kernel to support a bit more then 32 concurrent connections. While well documented if you know what your looking for, this can prove to difficult to implement if for example your on a shared hosting system.

    Documentation can be cryptic, tending to be more like a reference manual then an actual manual to teach you how something works. When it comes to optimizing the database itself this becomes painfully obvious as certain switches and options in the postgresql.conf file do little more then offer a one line description with no real clue on how a change will affect it.

    In MySQL for example there are sample configation files which show a 'typical' configuration for small, mid-sized and dedicated setups. I have yet to see something similiar and such discussions on the newsgroups have generally shot it down because of the exotic configurations out there.

    Vacuuming is one of those things that can really confuse people. While in MySQL deleting and altering rows has no real lasting effect for the user, this is not the case with Postgres. When a row is deleted, the information remains, but is unlinked, making the system run less IO but forcing you to juggle vacuuming, re-indexing and server operations.

    You could make use of the auto-vacuum daemon available. I found however, that performance suffered greatly when it was being used on my live system.

    More often then not, documentation will speak of load testing and tweaking the server at different values to see how it works. This is sound advice if you have the hardware and time necessary to get things going properly.

    On light loads, Postgres can be great, but once you start pounding at it it will slow down unless you know what your doing. The learning curve is far greater then MySQL, the documentation could stand to be more descriptive to end-users/non-Oracle DBA's and the tools available for Windows less advanced but the feature set will make it worth while if you can devote some time for trail and error.

  55. Re:Finally by fimbulvetr · · Score: 2, Informative

    I also suspect the master data is stored in a different place
    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 anyone at yahoo (and their finance/my yahoo customers) that the availability of their data is _not_ mission critical.

    Database crash? Just repopulate by querying the various data sources.
    Though that is entirely possible, I highly doubt that is their disaster recovery plan. Besides, even if they were using Oracle or MSSQL, this plan would still work.

  56. Almost accurate by einhverfr · · Score: 3, Informative

    While I think that PostgreSQL is the best open source database out there, there is one very important gotcha wrt: MVCC which can cause data integrity. This only happens when autovacuum is not running, of course.

    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.

    --

    LedgerSMB: Open source Accounting/ERP
  57. Change Column Types - finally by EugeneK · · Score: 3, Informative
    from the release notes :

    Change Column Types

    A column's data type can now be changed with ALTER TABLE.



    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.

    1. Re:Change Column Types - finally by tweek · · Score: 2, Interesting

      I think DB2 and other commercial databases do it this way anyway. They just encapsulate all the steps in an the ALTER table function.

      One thing to add is that you might have to rebuild any indices that use that column though. That's bitten us a few times using third party tools.

      --
      "Fighting the underpants gnomes since 1998!" "Bruce Schneier knows the state of schroedinger's cat"
  58. That's really dumb. by emil · · Score: 3, 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:

    • If you have an index on a NOT NULL column, count(*) will count the index, and it will be fast(er). If you don't have a suitable index, you will incur a full table scan. This is reasonable.
    • An Oracle table can have one or more "FREELISTS" - an insert will attempt to find a block from an available freelist, and a row lock will be applied to the transaction header of that block. If you have high insert activity, you can (re)build your table with more FREELISTS. You can have multiple transactions hitting a block if you don't exceed MAXTRANS. If you decided to shove the block clear full of data and you set INITTRANS to 1, you effectively have block-level locking, not row-level locking.
    • Oracle NEVER escalates a lock, and there is no table of locked rows in memory (and you should run away from any database that has such a structure).

    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?

    1. Re:That's really dumb. by einhverfr · · Score: 2, Interesting

      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.

      Why do you think MySQL performs so poorly with large number of concurrent users?

      --

      LedgerSMB: Open source Accounting/ERP
    2. Re:That's really dumb. by Cajal · · 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.

      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):

      Currently, MySQL supports table-level locking for ISAM, MyISAM, and MEMORY (HEAP) tables, page-level locking for BDB tables, and row-level locking for InnoDB tables.

      and from Section 7.3.2:

      To achieve a very high lock speed, MySQL uses table locking (instead of page, row, or column locking) for all storage engines except InnoDB and BDB.

      This is one of the many problems with MySQL. I agree with you that Oracle (and PostgreSQL) are much better designed.

  59. Installing PostgreSQL 8.0 alongside older version by matchboy · · Score: 2, Informative
    --

    Robby Russell
    PLANET ARGON
    Robby on Rails
  60. It looks like a great year for PostgreSQL by smchris · · Score: 3, 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% 2C 39020384%2C39173013%2C00.htm

  61. Re:Windows Version by LetterJ · · Score: 2, Informative

    *That's* the problem I remember from earlier setups. Basically, you have to *install* it as an administrator so that it can *run* as a non-administrator.

    That's a problem for users in a corporate environment where they aren't authorized to create users on their workstations.