Slashdot Mirror


PostgreSQL 7.4 Released

Christopher Kings-Lynne writes "PostgreSQL 7.4 has just been released. The list of new features is impressive and includes greatly improved OLAP performance among many other speed improvements."

32 of 451 comments (clear)

  1. Yummy, or about time. by blanks · · Score: 5, Informative


    IN/NOT IN subqueries are now much more efficient.

    Queries using the explicit JOIN syntax are now better optimized.

    New multikey hash join capability.

    Cursors conform more closely to the SQL standard.

    Sounds like they pushed closer to the SQL standards, good job guys.

    Does anyone here know more about this "New client-to-server protocol" they speak of?

  2. Full text searching improved and other goodness by SuperBanana · · Score: 5, Informative

    Full text searching also got another overhaul- I plan on messing around with it when I get some free time. They've included a .sql file you can just import into an existing DB.

    The real power here is that the index is quick to update, and as a result, can be done in real-time via triggers and stored procedures- neither of which you can do with MySQL :-) The new release is also even more SQL compliant- something else MySQL can't claim. PostgreSQL is both SQL92+98 compliant if I recall.

    It can't be said enough- PostgreSQL is now MUCH faster...and due to features like stored procedures, triggers, and some of the best locking available combined with some of the best transaction support, it's actually far faster at many of the same tasks if you take advantage of these greater abilities.

    Even back as early as '99, PostgreSQL absolutely mopped the floor with MySQL when as little as 10% inserts or updates were thrown into a select test. Why? Piss-poor locking and zero transaction support. The stuff you have to do in the application layer to make up for proper(or ANY) transaction support will make most benchmarks completely pointless.

    MySQL always has, and always will be, a DB best suited for blogs and 2-guys-in-a-garage; it's slapped together, has a low featureset, and is not standard-compliant. PostgreSQL is not an enterprise fish(replication still needs work if I understand it correctly)- Oracle, DB2 etc have that market pretty well covered- but it's great for everyone else who isn't, say, a multibillion $ company...if those people just bothered to have an open mind instead of pointing their fingers at benchmarks showing MySQL running out of an in-ram-only table can select 50,000 rows faster than PostgreSQL can, and whining about how they need to make a cron job to vacuum/vacuum analyze tables at an appropriate time(with autovacuum, also in this release, there goes that excuse!)

    1. Re:Full text searching improved and other goodness by rtaylor · · Score: 2, Informative

      Yes, there are plans to make a native windows port -- it's actually about 75% of the way there.

      The big issues now are safety. For example, sync() has traditionally been used for checkpoints to ensure everything is on disk. Windows does not seem to have an equivelant (though several close options).

      If your interested in helping out, please send a note to pgsql-hackers for a list of current issues for win32.

      --
      Rod Taylor
    2. Re:Full text searching improved and other goodness by abulafia · · Score: 2, Informative
      Does PostgreSQL have a good GUI component for direct database manipulation?

      Several. Take your pick. (Check the administrative link off the nav, and also look through the developer tools.)

      I understand that PostgreSQL requires cygwin to run on a Windows platform. Since my company is a Windows shop for now (I have not yet been able to convince them to move to Linux) this is an important issue for me. How big of a performance hit is there for running through the cygwin interface? In other words, is PostgreSQL faster than MySQL in Windows?

      Can't help you here, I've never done it. Sorry.

      Are there plans to go to a native Windows platform?

      Yes. There are technical hurdles, but it is actively being worked on. Check out the list, if you're interested.

      w

      --
      I forget what 8 was for.
    3. Re:Full text searching improved and other goodness by AKAImBatman · · Score: 2, Informative

      > Does PostgreSQL have a good GUI component for direct database manipulation?

      Traditionally, this has been the job of third party developers. SQL Server is the one exception as it tries to make you dependent on the GUI tools. Still, if you want a GUI tool, both pgAdmin and my own DataDino are good alternatives.

  3. Re:history of postgresql by Anonymous Coward · · Score: 1, Informative

    Ellison purchased his version of SQL off of IBM in the late 1970's or early 1980's for about $150K. Oracle has no ties to PostgreSQL.

  4. Re:Windows by RayMarron · · Score: 5, Informative

    And here's a link to the native Windows 7.2.1 release. I've tried it on NT4 and 2000. It seems to works just fine.

    http://techdocs.postgresql.org/guides/Installing On Windows

    --
    ON DELETE CASCADE
  5. Best New Feature by corby · · Score: 4, Informative

    New autovacuum tool

    The new autovacuum tool in "contrib/autovacuum" monitors the database statistics tables for "INSERT"/"UPDATE"/"DELETE" activity and automatically vacuums tables when needed.

  6. Re:Autovacuum by bmarklein · · Score: 3, Informative
    While vacuuming you can't really do much else with the database.

    Not true. Starting in 7.3, the default version of VACUUM no longer locks the table. From the 7.3 docs:

    Plain VACUUM (without FULL) simply reclaims space and makes it available for re-use. This form of the command can operate in parallel with normal reading and writing of the table, as an exclusive lock is not obtained. VACUUM FULL does more extensive processing, including moving of tuples across blocks to try to compact the table to the minimum number of disk blocks. This form is much slower and requires an exclusive lock on each table while it is being processed.

  7. Re:Autovacuum by kcbrown · · Score: 2, Informative
    It's still a labour-intensive task - for the dbms. While vacuuming you can't really do much else with the database.

    That's true if you're doing a VACUUM FULL. But that is now something that generally needs to be done only rarely (this will depend greatly on how you use the database). The database will now re-use freed tuples (VACUUM FULL compacts the physical table, thus eliminating such free space entirely and causing new data to be appended to the end of the physical table), so all that's usually needed is to find such tuples and mark them as being free.

    The autovacuum process invokes the standard VACUUM (without FULL) which does the "lightweight" VACUUM processing. It will also automatically update the statistics associated with the tables so that the planner will make better choices about things like whether to do a full-table scan or an index scan, the type of join to use, etc.

    VACUUM is much easier on the database than it used to be. It still isn't optimal, but if you read the pgsql-hackers mailing list you'll find that the developers are discussing at length how best to minimize VACUUM's effect on the database performance.

    --
    Use 'slashdot stuff' in the subject line in any email you send me if you want to get past the spam filter.
  8. Re:Impressive but... by Paul+Jakma · · Score: 5, Informative

    still no native replication.

    One of the new features in 7.4 is the replication technology contributed from eServer.

    --
    I use Friend/Foe + mod-point modifiers as a karma/reputation system.
  9. Re:Replication Replication by scrappy · · Score: 2, Informative
    re: replication ... the version of eRServer that PgSQL, Inc released OSS earlier this fall is Java based, actually ... only perl is for the admin scripts, and the OSS community is in the process, I believe, of getting rid of that also ...



    See eRServer on GBorg

    Jan Wieck is also just in the process of re-writing replication based on the experiences of eRServer, again, as an OSS project, and it can be viewed at:

    Slony-1 on GBorg

  10. Re:Rock on! by mattcasters · · Score: 2, Informative

    I beg to disagree on the JDBC claim.
    As long as Statement.setFetchSize() or Statement.setFetchDirection() are not supported, it's close to useless to me.
    Try going over a couple of milion records if you doubt it's really needed.
    Not that MySQL's driver is any better in this regard.
    Real JDBC drivers like the ones for Oracle, DB2 and (gasp) even SQL Server support these hints without a problem.

    Matt

    --
    News about the Kettle Open Source project: on my blog
  11. Re:Windows by justins · · Score: 2, Informative
    What's wrong with Cygwin. Not on the "approved" list? Unless that's the problem I wouldn't hesitate to use it; it's pretty darn solid today.

    Performance.
    --
    Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
  12. Did anyone notice today that.... by icejai · · Score: 2, Informative
    MaxDB is out?

    MaxDB is a sort of merger between sapdb and mysql. As of today, MaxDB includes features such as:

    * Views * Server-side cursors * Stored procedures and triggers * Automatic failover (to a standby server) * Scheduling and automatic messaging on alerts * Snapshots * Archive tables * Synonyms

    And these are features in addition to mysql's feature set!

    Check it out guys! http://www.mysql.com/products/maxdb/index.html

    But don't be in too much of a rush to upgrade, mysql interoperability is slated for Q1 of 2004.

    Enjoy!

  13. Re:Enough of the anti-MySQL garbage by thing12 · · Score: 4, Informative
    But MySQL has had transactions and row-level locking for quite some time now

    Sure, row-level locking is nice -- even MSSQL has that. PostgreSQL has MVCC - so that writers never block readers and likewise. Complete data consistency (i.e. repeated reads give the same results) from the start of a transaction to the end of it. Can MySQL do that? (I am actually asking....)

  14. Windows via cygwin by rjamestaylor · · Score: 2, Informative
    As soon as a MySQL version runs on Windows without cygwin, a PostgreSQL version will be available.

    What? You didn't know MySQL ran via cygwin?

    • C:\mysql\bin\cygwinb19.dll
    MySQL just has a better installation process is all.

    BTW, I run cygwin on my WinXPPro laptop (the only way I'll get UNIX-like OS features on my Dell Inspiron 5150 sadly) along with KDE3. Yep and uh-huh.

    --
    -- @rjamestaylor on Ello
  15. Re:Impressive but... by gabe · · Score: 2, Informative

    MySQL has raw disk usage thanks to InnoDB. The only draw back is that it's slower than using regular InnoDB files in an actual filesystem... So, MySQL clearly doesn't have any advantage over PostgreSQL since it has raw disk support.

    Looking for replication? Use the eRServer replication that comes with PostgreSQL now.

    --
    Gabriel Ricard
  16. Re:Autovacuum by Zeut · · Score: 5, Informative

    Ok, there is a lot of talk about vacuum what it does / doesn't do and what effect autovacuum has. Here are the details (FYI, I wrote pg_autovacuum).

    Recent versions of postgresql don't take your database offline during vacuum. However, the vacuum process is an I/O intense process and can still, even 7.4, slow the server significantly while it's running. Work is has alredy been done in the 7.5 development tree to address the I/O storm created by vacuum.

    Typically, you setup cron to run vacuum your entire database nightly. This is fine, except it has two main problems. 1) It wastes time vacuuming large tables that probably don't need it (think audit train table that only gets inserted into). 2) It probably doesn't vacuum tables that are constantly updated often enough, which results in bloated data files, and slower queries.

    The new pg_autovacuum daemon addresses both of these concerns by monitoring database activity (using the stats system). When it sees that a table has has been modified enough to warrant a vacuum then it does so, when it sees that a table might benifit from a analyze only, then it does that. And when a large table doesnt' need to be vacuumed, it doesn't vacuum.

  17. Re:Rock on! by slamb · · Score: 2, Informative
    I beg to disagree on the JDBC claim. As long as Statement.setFetchSize() or Statement.setFetchDirection() are not supported, it's close to useless to me.

    Cursors are supported now. Nic Ferrier wrote a patch for this back in April, and I think it got applied in the beginning of May. There's a trick I can't remember right now to enable it (maybe setting the result set type/scrollability first with JDBC2 methods), since it's not quite as efficient for smaller queries. I'm sure the people on the pgsql-jdbc mailing list would help you if you can't figure it out.

    Keep in mind that the JDBC drivers shipping with any given version of PostgreSQL are likely not the best available drivers to use with that version. The JDBC people don't make changes to the release branches, unless they started recently. The best available drivers tend to be the ones from their website or in CVS HEAD.

    Also, if you stumble on a page listing the compliance features/misfeatures of PostgreSQL, it's hopelessly out of date. I hope they're not still linking to it. The picture is much brighter than what that page suggests.

  18. Re:postgres isn't used in the enterprise by AstroDrabb · · Score: 2, Informative

    In the PostgreSQL FAQ, PostgreSQL is pronounced Post-Gres-Q-L.

    --
    If Tyranny and Oppression come to this land,
    it will be in the guise of fighting a foreign enemy. -James Madison
  19. Re:Windows by Anonymous Coward · · Score: 2, Informative

    See http://momjian.postgresql.org/main/writings/pgsql/ win32.html

    with the latest update on this issue.

  20. Re:Windows by gabe · · Score: 5, Informative

    CommandPrompt Mammoth PostgreSQL for Win32, Mac OS X, Linux
    http://www.commandprompt.com/entry.lxp?lxpe=295

    dbExperts PostgreSQL for Windows, Mac OS X, Linux
    http://www.dbexperts.net/postgresql

    PowerGres (threaded Windows PostgreSQL
    http://osb.sra.co.jp/PowerGres/introduction-en.php

    --
    Gabriel Ricard
  21. Re:Win32? by Zeut · · Score: 2, Informative

    Originally it was hoped that 7.4 would have a native win32 port. In fact much work has been done, but it didn't get done in time for 7.4. Work continues, and it's getting closer. Everyone working on it hopes that it will be included in the next version of PostgreSQL, but no one will promise. Such is life in an Open Source project.

  22. Re:Windows by PizzaFace · · Score: 5, Informative

    "Create native Win32 port" is one of three "urgent" items on the PostgreSQL to-do list, and Bruce Momjian publishes a detailed status report on the ongoing work. No one on earth can tell you when the work will be complete.

  23. Re:Never used PostgreSQL by tangledweb · · Score: 2, Informative

    Take a look at MySQL's current state. Way behind on the times... for example: it *still* doesn't have stored procedures. Do you realize how annoying it is hardcoding SQL statements? There's complete lack of subquerying, which really makes it a pain to do certain calculations often requiring additional queries, which is extremely inefficient (although I do understand that it's currently in alpha).


    No, stored proceedures are in Alpha. Sub queries have been in production for a year.
  24. Re:This could be good... by kfg · · Score: 3, Informative

    Yes, MySQL is small, light and fast and I use it as my general light duty DBMS, but I'm not religous about it. When the going gets tough I switch to something tougher.

    Looks, it's not because you can't do things with MySQL. It's how you have to go about doing them. That lightness and speed comes at a price, it's an engineering tradeoff. There's no such thing as a free lunch and all that.

    What it gives up is intergrety constraints. If you don't spend the cycles to insure data integrity you can be smaller and faster.

    So let me ask you, how fast do you want your data munged?

    If you don't want your data munged at all and you're using MySQL you need to pass off integrity issues to your app. Well, there you are using cycles again. The DBMS is faster, but now your app is slower (yes, you're still saving a bit of disk access time, which can add up. That's a flaw in SQL itself. There are alternatives.). More importantly you're using your time as a developer to reinvent the integrity constraint wheel in every app. Coding time goes up. Bugs go up. Support issues go up. All to accomplish something that is a logical function of the DBMS. That's why we call them a DBMS in the first place. It has been argued that MySQL doesn't even meet the definition of a DBMS.

    Once I had data
    My DBMS munged it
    But damn it was fast!

    Again, don't get me wrong, I use MySQL, but I use it in full knowledge of what it does and does not do and what it does not do is guaruntee the consistency and integrity of my data.

    And I have better things to do with my time than recoding DBMS functions into my apps. I use MySQL where data integrity isn't a critical issue.

    KFG

  25. Re:Bah! (grumble, grumble, grumble) by Anonymous Coward · · Score: 1, Informative

    WITH RECURSIVE is under development, and we may have it for the next version.

    See contrib/tablefunc in your PostgreSQL source for an implementation of CONNECT BY as a Postgresql function. We've had this for a year.

    -Josh

  26. Mysql speed by vlad_petric · · Score: 2, Informative
    Your comment is implying that mysql is actually faster than postgresql. That's simply wrong.

    Yes, if you run simple queries in a single user scenario you do get better performance with mysql than with pg. With more complex queries and more users however, the simplistic query optimizer and concurrency manager that mysql has makes it perform worse than pg.

    --

    The Raven

  27. Re:PostgresQL is slow... by chriskl · · Score: 2, Informative

    This is just not true. If you were unwilling or unable to tune your DBMS, you can hardly go blaming PostgreSQL!

    All you need to do is reduce your random_page_cost a bit, set your effective_cache to an appropriate value and bob's your uncle.

    PostgreSQL can do optimisations that MySQL can only dream of. The reasons most of those posts are complaining about the optimiser is, let's face it, the users in question don't know about indexes. Another whole lot of them are about the slowness of IN () queries - which is now hundreds of times faster in PostgreSQL 7.4.

    The deal with outer joins in PostgreSQL is that they are executed in the order you specify in your query. This means that you simply just have to have a couple of tries with it to make sure you haven't written a totally degenerate query.

    There is discussion on allowing the optimiser to re-arrange outer joins, however it is a rather difficult problem theoretically to be able to prove that a certain rearrangement will still be an equivalent query.

    Chris

  28. Re:PostgresQL is slow... by mijp · · Score: 2, Informative

    Speedwise, PosgreSQL trails the pack by a fair bit. Sometimes it would be comparible to Oracle, and other times it wouldn't be without a fair bit of tuning. Outer-joins, for example; the optimizer can't seem to make heads or tails of it.

    The 7.4 release is much better on explicit join optimization (the formerly behavior of using explicit joins as optimizer hints has been disabled by default). So using outer-joins should be improved. PostgreSQL is advancing.

  29. Re:There is no such thing as "faster" by ma_sivakumar · · Score: 2, Informative
    The athmosphere in PostgreSQL community reminds me the one of BSD (read: very unfriendly).

    In my experience the PostgreSQL user mailing list pgsql-general@postgresql.org is one of the most friendly mailing lists I subscribe to.

    You get answers to trivial questions as well as very complex ones. I have not seen anyone flamed for asking something. People are very helpful. I have seen a couple of cases where problems affective live databases were sorted in the mailing list threads within hours.

    I do not understand what do you mean by "very unfriendly")

    (I use postgresql for our application)

    --
    yAthum UrE yAvarum kELir All the places are our place, everybody is our kin. (A Tamil Poet - 2000 years ago)