Slashdot Mirror


PostgreSQL 8.3 Released

jadavis writes "The release of the long-awaited PostgreSQL version 8.3 has been announced. The new feature list includes HOT, which dramatically improves performance for databases with high update activity; asynchronous commit; built-in full text search; large database features such as synchronized scans and reduced storage overhead; built-in SQL/XML support; spread checkpoints; and many more (too many major new features to list here). See the release notes for full details."

65 of 286 comments (clear)

  1. PostegreSQL 8.3? by Anonymous Coward · · Score: 5, Funny

    Would that be POSTGR~1.SQL?

    1. Re:PostegreSQL 8.3? by sparks · · Score: 2, Insightful

      There are 2^16 port numbers, but there are no theoretical limits on the number of connections incoming to a single port.

      A TCP connection is uniquely identified by *all of* the source IP address and port, and the destination IP and port. There can be many connections to a server on a particular port, distinguished by the client address and port number.

      Of course to get more than 2^16 connections you would need more than one client machine.

  2. Cross Database Joins?? by Foofoobar · · Score: 4, Interesting

    The one thing that has stopped me from picking up Postgresql yet is that I can't do cross database joins on the same server. Should a user have the same permissions on two separate databases on the same server, a properly constructed query should be able to join across multiple DB's but they still don't implement this yet that I am aware of.

    --
    This is my sig. There are many like it but this one is mine.
    1. Re:Cross Database Joins?? by geniusj · · Score: 4, Interesting

      You should consider using schemas as opposed to entirely separate databases.

    2. Re:Cross Database Joins?? by dfetter · · Score: 4, Insightful

      There are several ways to do cross-database JOINs in Postgres including dblink, and even to other DBMSs via dblink-tds and DBI-Link, but try schemas first, as another poster mentioned.

      --
      What part of "A well regulated militia" do you not understand?
    3. Re:Cross Database Joins?? by glwtta · · Score: 4, Insightful

      Often databases are created in a vacuum and only later does one need to utilize multiples in a query.

      That feels wrong somehow; if your (logical) databases are so distinct that you can't plan to co-locate them in the same (Postgres) database, does it make sense to have such tight coupling on the query side? Now you have to synchronize the data between them, and you can't move them off the same machine, so what's the point of keeping those databases separate? It also seems like client code should never have to know where different databases are physically located.

      I don't agree that this is the "simple solution", it's a horrible hack on the part of the database engine (I don't actually know if anyone apart from Oracle does this) with unpredictable performance results - looks more like the "lazy solution".

      I don't know, just seems like such a thing breaks the database/application "contract".

      Besides, shouldn't your ORM layer abstract such minutiae away pretty easily?

      --
      sic transit gloria mundi
    4. Re:Cross Database Joins?? by prog-guru · · Score: 3, Informative

      I don't know, seems to me a cross database join is neither simple nor proper structure. If you are stuck with it schemas would probably work, painless in Active Record, perl DBI requires 'schema.table' syntax.

      --

      chris@xanadu:~$ whatis /.
      /.: nothing appropriate.

    5. Re:Cross Database Joins?? by Qzukk · · Score: 2, Informative

      the simple solution is often easier and faster than the complex solution

      When you want something that walks like a duck and talks like a duck, the simplest, fastest, and easiest solution is to get a duck. What you want is done by schemas in postgresql. If you're really doing the separate databases for "performance" reasons, then one presumes that at some point you're going to be putting the databases on separate servers, in which case you'll be wishing you had started with dblink in the first place.

      What you're asking for may be "simple" for you, but what about the server side? Rewriting the entire database engine to have a monolithic superdatabase to store system catalogs and authorization information for the databases underneath is none of "simpler, faster or easier", while it does the exact same thing for you as having a "super" database with schemas underneath it using the search_path setting for applications that you don't want to rewrite with schema.table syntax for all of their queries.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    6. Re:Cross Database Joins?? by dfetter · · Score: 2, Funny

      I'm looking forward to the hooks you're working on that will make them more efficient :)

      --
      What part of "A well regulated militia" do you not understand?
  3. Will it be used? by Anonymous Coward · · Score: 4, Informative

    I'm a postgresql fan, I've considered it a superior database for years.

    However, it seems every client I come into contact with (I am a freelance software designer) seems to believe mysql is the only open source database available and certainly the best one for all jobs.

    Mysql is great (or at least, was great) for fast connection times and speed but for a stable, feature-rich excellent database, postgresql has always been ideal.

    It's just a shame no one seems to be aware of it.

    1. Re:Will it be used? by cheater512 · · Score: 2, Informative

      People like myself who design software requiring a database usually prefer speed over features.
      Thats why MySQL is usually chosen.

    2. Re:Will it be used? by ByteSlicer · · Score: 5, Funny

      That, and people are more likely to remember 'My' than 'Postgre'.

    3. Re:Will it be used? by jadavis · · Score: 3, Interesting

      People like myself who design software requiring a database usually prefer speed over features.

      Keep in mind that PostgreSQL may have more stable performance for a varied workload. That may mean fewer surprise slowdowns for you.

      I don't know your specific situation, but you may want to re-evaluate postgresql for your needs, especially if you care about performance -- PostgreSQL made leaps and bounds in this area in 8.3. I'm not sure what the last version you tried was, but 8.2 was a good performance boost as well.

      And if it still doesn't hold up to your expectations, please post your benchmarks to pgsql-performance, so that others can either help you meet the needs, or improve postgresql for the future.

      I would think also, as a developer, you might like the data integrity available in PostgreSQL that can help catch tough bugs early. Also, MySQL has many configurable options that may make your application not work and your customers unhappy (including table type -- changing table types from MyISAM to InnoDB or vice-versa may break applications). PostgreSQL's options (for the most part) don't affect the application.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    4. Re:Will it be used? by LurkerXXX · · Score: 2, Informative

      You people who design software should read up on this thing called data integrity, and enforcement of foreign key constraints.

      MySQL is pretty bad at those, but if you use an innodb table and try to use them, you find it's no faster than postgresql. And still missing many many features that postgresql gives you.

    5. Re:Will it be used? by jocknerd · · Score: 2, Informative

      If you want raw speed, you should be using SQLite instead of MySQL. Plus, are you using the InnoDB database engine? If you are, then you are not getting MySQL's raw speed. That only comes with their native database engine. You know, the one that doesn't support much of SQL at all.

    6. Re:Will it be used? by LurkerXXX · · Score: 2, Insightful

      And even more instances where they are needed, but not known/understood by a MySQL user.

    7. Re:Will it be used? by Plaid+Phantom · · Score: 5, Funny

      You have a 100 GB database and you're not concerned with stability??

      Do you work for the government?

      --
      All comments are properties and trademarks of the voices in my head. Not like I'm gonna claim them.
  4. And then... by n3tcat · · Score: 3, Interesting

    someone will make a comment regarding how sad the story of Postgres's popularity is, and how they've seen German folk music with more of a following.

    1. Re:And then... by thrillseeker · · Score: 3, Funny

      well, we will just have to polka holes in that discussion

  5. asynchronous committ by stoolpigeon · · Score: 4, Insightful

    this was a new feature for Oracle with 10g R2 also - and as a DBA I can only shake my head and ask "why?" Why would you want to drop the durability part of ACID? Why would you risk losing data for speed? There are so many ways to tune things and speed things up without taking such drastic measures. I know I'd fight tooth & nail before I'd turn this on in anything I managed. I just hate to think that someone with less understanding is going to think of it as a 'go-faster' button and then blame postgres when they lose something important.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    1. Re:asynchronous committ by Wesley+Felter · · Score: 4, Funny

      Haven't you heard? In Web 2.0, data integrity doesn't matter.

    2. Re:asynchronous committ by nuzak · · Score: 4, Interesting

      > Why would you want to drop the durability part of ACID?

      SQL already allows you to drop to READ_UNCOMMITTED if you really really want to -- though the DB actually under no obligation to drop to that level, you're just specifying that you don't care. That removes A, C, and I all at once. Why not make the D part optional too?

      Not all databases are commerce. My company processes several billions of rows a day of data, and if we accidentally lose some data, it just degrades effectiveness a little bit and means our statistics just have to interpolate a smidge. In fact, we deliberately drop a lot of it anyway.

      --
      Done with slashdot, done with nerds, getting a life.
    3. Re:asynchronous committ by Simon+(S2) · · Score: 2, Insightful

      Because sometimes you don't really care if the data will be there after the commit or not, you just need to do it fast. For example say you have a sensor that counts how many nails go in a package. You have to fill the package with 1000 nails, but it is not really important if there are 999 or 1001 nails in the package, the important thing is that the counter goes fast, say 1000 counts in 1/100 of a second.
      It's not a feature you will use in your web or c/s app, but it has it's uses, and it's good to have it there.

      --
      I just don't trust anything that bleeds for five days and doesn't die.
    4. Re:asynchronous committ by stoolpigeon · · Score: 2, Interesting

      I have a limited frame of reference - my experience has primarily been in the support of mission critical business processes - where data loss is the end of one's job. And from the replies I guess I can see that circumstances exist where this might be desirable, though part of me wonders, if in such cases that a database is the right tool.
       
      My other concern still stands - I hope the documentation makes the ramifications of choosing this option clear.

      --
      It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
    5. Re:asynchronous committ by RelliK · · Score: 5, Interesting

      SQL already allows you to drop to READ_UNCOMMITTED if you really really want to -- though the DB actually under no obligation to drop to that level, you're just specifying that you don't care. That removes A, C, and I all at once. Why not make the D part optional too?
      False. SQL standard explicitly specifies that writing to the database under READ UNCOMMITTED isolation is not allowed. You can only do read-only queries. Further, PostgreSQL doesn't even support READ UNCOMMITTED. There is no need for it. PostgreSQL implements MVCC such that each transaction gets a private snapshot of the database. With that you get READ COMMITTED for free.

      I'm with the original poster here. Asynchronous transactions seem like a bad idea. But then it's not PostgreSQL's responsibility to enforce good software design. And maybe in some corner cases people can find use for them.

      --
      ___
      If you think big enough, you'll never have to do it.
    6. Re:asynchronous committ by Simon+(S2) · · Score: 3, Informative

      Sure. Like so many times in software development "only you can decide whether data loss is acceptable to you. But there are many classes of applications, including high-speed data ingest programs whose only goal is to get the stream of data into the database, where commit-but-don't-wait is not only acceptable but very desirable performancewise." (Tom Kyte)

      --
      I just don't trust anything that bleeds for five days and doesn't die.
    7. Re:asynchronous committ by dfetter · · Score: 2, Insightful

      It is a lot safer than turning fsync off. That's the point of the feature :)

      --
      What part of "A well regulated militia" do you not understand?
    8. Re:asynchronous committ by ivoras · · Score: 2, Informative

      Are you sure this is such a disaster? As far as I can tell this only means that executing "COMMIT" doesn't block (wait) until the commit has actually happened but returns immediately, and the actual operation is performed "later". The data still goes through the journal (WAL), is still fsynced when needed, etc.

      --
      -- Sig down
    9. Re:asynchronous committ by Ruzty · · Score: 2, Insightful

      Such a count does not require a DB write per transaction ( nail++ ). Such minor amounts of data are better left memory resident if they are wiped after a quantifier is reached. DB writes are for the purpose of keeping state. In your example the only reason to keep state is should the machine fail and the boxes be partially filled the remaining count necessary to complete the box needs to be known. That is better done with a physical weight measurement than a DB query.

      Asynch writes are useful for keeping history on data that may be used to recreate or replay a period of time of data flow that is more dependant upon trending and rate than actual values. Say you have an automated trading system and you're working on various reaction algorithms based on market events. Recording a real-time stream of market data for playback during system testing is a perfect use for asynch commits. You want a replayable record of market data flow but the order it came in and even missing some records isn't as important as the data set as a whole.

      --
      The Master (Angelo Rossitto) in Mad Max Beyond Thunderdome, "Not shit, energy!"
    10. Re:asynchronous committ by greg1104 · · Score: 4, Informative

      Why would you risk losing data for speed? There are so many ways to tune things and speed things up without taking such drastic measures.


      The new async commit feature bypasses the requirement that records physically hit disk in order to complete a commit. If you must wait for a disk commit (typically enforced by fsync), the maximum number of true commits any one client can do is limited by the rotation speed of the hard drive; typically an average of around 100/second for a standard 7200RPM disk with PostgreSQL. There is no way whatsoever to "tune things and speed things up" here; that's how fast the disk spins, that's how fast you get a physical commit, period.

      In order to accelerate this right now one needs to purchase a disk controller with a good battery-backed disk controller and pray it always works. If it doesn't, your database might be corrupted. With async commit, you can adjust the commit rate to something your disks can keep up with (say 50/second) just with this software feature while still allowing a write rate much higher than that, and at no point is database corruption possible (from this cause anyway). This makes people who want to use PostgreSQL in things like shared hosting environments have an option that allows heavy writes even for a single client while having a reasonable data integrity policy--only server crashes should ever lose you that brief period since your last true commit. That's a fair trade for some applications (think web message boards for example) and lets PostgreSQL be more competitive against MySQL based solutions in those areas.
    11. Re:asynchronous committ by plopez · · Score: 2, Funny

      Why would you want to drop the durability part of ACID? Why would you risk losing data for speed?

      SO you can write sloppy inefficient code and do sloppy DBA work and get away with it?

      Just an idea.

      --
      putting the 'B' in LGBTQ+
  6. Re:Nice. by Seumas · · Score: 5, Funny

    8.3 had me at "full-text search".

    Now, please excuse me while Postgres 8.3 and I go take a little alone-time in a dark closet.

  7. long live postgres by squoozer · · Score: 3, Insightful

    As far as databases go I don't think it gets much better than Postgres and I reckon over the years I've tried most popular databases. What I really don't understand though is why Postgres doesn't own more of the database market. Sure it was a bit slower than MySQL a few years ago but the benifits that you reaped for that slightly slower speed far outweighed the cost. The difference know is, I would say, much small and less significant.

    I can only assume that MySQL keeps it's large market share because it has commercial backing and therefore good support. I'm sure there are plenty of products taht don't require that level of support though.

    --
    I used to have a better sig but it broke.
    1. Re:long live postgres by costing · · Score: 3, Interesting

      I can only assume that MySQL keeps it's large market share because it has commercial backing and therefore good support. No, it's because people are used to LAMP, and tons of easy-to-install apps only have MySQL support. But there is hope, I see more and more PHP apps allowing you to choose PostgreSQL instead. I think this is the turning point, once they reach the critical mass needed to turn the developers' heads it will become THE open source database. And for a good reason, it beats MySQL in every way you imagine, including the obvious features and not so obvious performance. Well, maybe for two queries in a 10 rows table MySQL will see an edge and enjoy, but let's face it, it never scaled up to more than that :)

      I guess we will have to get used to saying LAPP from now on and not grin when we do. :D
    2. Re:long live postgres by Lennie · · Score: 2, Insightful

      The problem with the whole LAMP-acronym is, we have a lot more to choose from. What do you think of: LLPP (Linux, lighttpd, Perl, PostgreSQL) or something like that.

      --
      New things are always on the horizon
    3. Re:long live postgres by pathological+liar · · Score: 2, Insightful

      Replication. None of the replication options for Postrgres are particularly pleasant, especially when compared to the support that's built into MySQL.

    4. Re:long live postgres by David_W · · Score: 2, Funny

      What do you think of: LLPP (Linux, lighttpd, Perl, PostgreSQL) or something like that.

      My personal favorite is FAPP (FreeBSD, Apache, PostgreSQL, Perl).

      ...

      What's so funny?

    5. Re:long live postgres by greg1104 · · Score: 3, Informative

      This is one of those things that's painful only until you've crossed a certain threshold of information, then it never bothers you again. It's better now but still harder to put the pieces together than it should be.

      Start with the documentation on creating a cluster: http://www.postgresql.org/docs/current/static/creating-cluster.html In 8.3 the default of using auth you mentioned has been removed, for the reasons you described. So it now runs as unsecured for local users by default and you have to worry about this yourself, which since it reduces the frustration at getting started was deemed an improvement.

      That page suggests some options you can pass to initdb to adjust the default security level. Now you want to look at the initdb docs: http://www.postgresql.org/docs/current/static/app-initdb.html See that if you use -W/--pwprompt (same thing) you can assign a password to the database superuser at cluster creation time. If you do that, you can now change the default authentication scheme to password-based (-A md5 passed to initdb will do that), you'll be secure, and you'll have one user you can login as (postgres) to create more.

      To see what other authentication methods are available and to learn what your options are look at http://www.postgresql.org/docs/current/static/client-authentication.html The one you really need to dive into is pg_hba.conf which is the magic text file to edit here. A new one of those will be put in the base directory of your new database cluster. Open that file up, look at the documentation, and you'll need to add a line to add network support like one those in the examples. Probably something like

      host postgres all 192.168.12.0/24 md5

      (allow access to anybody on the 192.168.12 subnet access the database with a password)

      That should get you past the ugly initial hurdles. The next document you may need is how to add more users: http://www.postgresql.org/docs/current/static/sql-createrole.html

      again look at the examples first and then backtrack to the parameters, will make more sense that way. After that you'll want to create more databases with createdb: http://www.postgresql.org/docs/current/static/app-createdb.html

      And then you should be able to find your away around from there using the psql command line tool.

      Note that once you get past accepting connections over the network, you could use a tool like pgAdmin III to handle the rest of this work using a slicker interface. There's even a copy of it bundled with the Windows installer you can use on such a client to administer a remote server running a real OS. It's of course possible to install pgAdmin manually on other platforms as well, see http://www.pgadmin.org/ for other verions (note that binary packages for platforms like RPM don't show up in every release, you have to go back to v1.8.0 to get the last full set of packages).

    6. Re:long live postgres by turbidostato · · Score: 2, Interesting

      "This is one of those things that's painful only until you've crossed a certain threshold of information, then it never bothers you again."

      For the most part then it's too late.

      There are *a lot* of people that started their days on DBs by their own or as another issue clogged to their back. Then they go opensource just because it's easier to start with (no provisions, not a dozen calls to a provider, just an "apt-get install" and you are on your way). Then you look for Postgres; it has a fame of a serious, reliable full-featured database, you start toying with it, having a light look at the manuals (remember: you are either a neophyte or burdened with other tasks; no time or ability to spend the time on a dense manual and start seeing the results next week)... and you go nowhere. Let's try the next one, you say, so you go with MySQL; you install it and within five minutes you get your first "show databases" and "select * from table"; you smile, you feel the strong feedback and there you go. Of course, after a year using MySQL you understand some basic concepts and you could give another try to Posgres, but who cares now? MySQL has the work done for the most part, you know its nuisances and you have invested a lot of time on it.

  8. Time for a cross-DB comparison by jd · · Score: 4, Insightful
    PostgreSQL 8.3 is nicely timed. I've been looking forward to trying it in a setting which wouldn't allow the use of betas. Now I've got the on-topic stuff out the way, onto my main point.

    There are so many Open Source databases (MySQL, MaxDB the last GPL version, Firebird, Postgresql, Ingres Community Edition, hsqldb and H2) that it is hard to know which ones implement what, which ones are useful for what, or which ones are optimal for what. Simple benchmarks (a) rarely are, and (b) usually want to promote one specific product over another. There are standardized tests, for a small fortune and by a relatively closed group who probably don't have a fraction of the range of experiences of databases in the real world, so cannot possibly be trusted to authenticate a standard or measure that could be used to compare databases.

    We could really do with some serious side-by-side evaluations of these database engines, or at least decide what such evaluations would need to be to be actually useful. (Hey, maybe CmdrTaco can add a comparison section, get it sponsored by Which? or some other consumer guide, and have some of us run evaluations. It'd have to be done well to not be flamebait, which I think might rule me out, but if it could be done, it would be hellishly useful.)

    --
    It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    1. Re:Time for a cross-DB comparison by naasking · · Score: 2, Informative

      A couple such comparisons already exist. They may be a year or two out of date however.

    2. Re:Time for a cross-DB comparison by TheNarrator · · Score: 3, Informative

      Here's a feature matrix of new features vs. old versions. It's easy to see that 8.3 is a huge upgrade.

      http://www.postgresql.org/about/featurematrix

    3. Re:Time for a cross-DB comparison by 0racle · · Score: 2, Informative

      PostgreSQL vs. MySQL WIki

      Seems to be features only, no performance.

      --
      "I use a Mac because I'm just better than you are."
  9. what do you mean by cross-database join? by Reality+Master+201 · · Score: 2, Informative

    Are you thinking like you'd do in SQL server (IIRC) or MySQL, where you have a db reference in the table list (i.e., SELECT * from db1.table1, db2.table2 WHERE [join clause])?

    you'd probably just want to use a schema for that; the concept maps more or less the same way.

  10. Re:Multi-master replication built in by Acheron · · Score: 3, Informative

    The 8.3 release notes list the Bucardo project http://bucardo.org/ for multi-master replication. I haven't used it... is there something that it is lacking that you think would be addressed by bringing it into the core code base?

  11. Re:asynchronous commit by Anonymous Coward · · Score: 2, Informative

    Asynchronous commit is very useful in applications where the thing that's important about the data is its statistical distribution, and not the individual data points per se.

  12. Re:New HOT, faster Postgres by naasking · · Score: 5, Insightful

    Yeah, if only for those darn inconvenient facts demonstrating that PostgreSQL is faster than MySQL, particularly under load. Note that the benchmark was PostgreSQL 8.2. Now note that 8.3 is up to twice as fast as 8.2. I think the polarity on your order of magnitude performance difference should be reversed.

    Of course, if you actually care about data integrity and database features, there's not contest at all. But the performance gap is now non-existent, if not completely reversed.

  13. Re:New HOT, faster Postgres by glwtta · · Score: 4, Insightful

    Oh give it a fucking rest. MySQL is 10-15% faster on simple queries, with few threads, on a single disk.

    And that's only with MyISAM (in which case, why bother with a database server? SQLite is probably enough for your needs).

    --
    sic transit gloria mundi
  14. Re:How quickly they turn on you .. by swimmar132 · · Score: 3, Insightful

    Going from 8.2 to 8.3 in postgresql is not a 'minor' release. It's quite a major step with a lot of new features.

    Would it make a difference to you if they bumped up the version number to 9?

  15. Re:How quickly they turn on you .. by glwtta · · Score: 2, Informative

    8.2 was released over a year ago - this is not a minor revision.

    --
    sic transit gloria mundi
  16. Upgrade Procedure by AltImage · · Score: 2, Interesting

    "A dump/restore using pg_dump is required for those wishing to migrate data from any previous release"

    Postgres have a habit of making you do this to upgrade and it really sucks. I understand the reasons behind it, but that does not reduce the amount of suck, especially for a large database.

  17. Postgres Books? by crustymonkey · · Score: 2, Interesting

    Does anyone know of a good, semi-recently written book on PostgreSQL? Everything I find is from at least 3 years ago. Is it that PostgreSQL hasn't changed much, barring this release, in the past few years?

    --
    \033:wq!
  18. MySQL is FAST, PgSQL FARTs on MySQL's Performance by einhverfr · · Score: 2, Funny

    Fast
    And
    Sorta
    Transactional

    PostgreSQL is
    Fast
    And
    Really
    Transactional

    And under heavy loads with normalized db's PostgreSQL's planner does *much* better than MySQL's.

    --

    LedgerSMB: Open source Accounting/ERP
  19. Why PostgreSQL doesn't have more of the market by einhverfr · · Score: 2, Informative

    I have used PostgreSQL as my primary db since 2000 (version 6.5!) and I have watched it for a while.

    PostgreSQL had a number of problems in the past which made it hard to work with including:
    1) No ALTER TABLE DROP COLUMN support and other things needed for prototyping (fixed in 7.2 iirc)
    2) Issues with dependency tracking in text SQL dumps (fixed in 8.0) meaning that some times one had to hack dumps to get them to restore properly.
    3) maintenance tasks required exclusive locks on tables (corrected sometime in 7.x)
    4) other things which generally made it somewhat user-unfriendly.

    Note that all of the above issues have been corrected as of three years ago. However by that point a lot of the small less serious appliations were more or less wedded to MySQL. For large, shared databanks, PostgreSQL and Ingress II (and maybe Firebird) are the only serious choices. MySQL fails to be useful as soon as you end up requiring the sort of thing described in the title of Codd's original paper....

    --

    LedgerSMB: Open source Accounting/ERP
    1. Re:Why PostgreSQL doesn't have more of the market by Just+Some+Guy · · Score: 2, Insightful

      I thought Wikis were shared by definition.

      Forget about the Wiki part. "Shared" here means that many clients are simultaneously reading from and writing to the same store. Sites like Slashdot and Wikipedia are darn near read-only in that sense, because a comment or article is typically viewed many thousands of times more often than it is written or edited.

      Contrast with something like a point of sale system where each time a clerk scans in a product, a unit is removed from the inventory database and the accounting system gets updated with the new revenue. Multiplied by a few thousand terminals, that is a large, shared data bank.

      --
      Dewey, what part of this looks like authorities should be involved?
  20. You are on to something. by NotQuiteReal · · Score: 5, Funny

    If PostgreSQL changed their name to OurSQL it would be easy to remember, and a sound a lot less selfish than MySQL.

    --
    This issue is a bit more complicated than you think.
  21. Re:whuh? by Just+Some+Guy · · Score: 2, Insightful

    I think the disconnect is that PostgreSQL has a different definition of schema than you are using.

    --
    Dewey, what part of this looks like authorities should be involved?
  22. Does it support multithreaded queries? by G3ckoG33k · · Score: 2, Interesting

    Hi, I read that "MySQL does not uses several CPUs to execute single query - only multiple connections may benefit from several CPUs.". That was written January 6 2004 by Peter Zaitsev, then a full-time developer at MySQL AB, www.mysql.com. I found the quote at http://lists.mysql.com/benchmarks/45

    Does anyone know if PostgreSQL supports a dual or quad CPU when it comes to executing a single query, or if MySQL now supports it?

    The reason I ask is that I have a database with tens of millions of records and even 'simple' queries take a long time. Would it be beneficial to buy a 8 core machine, i.e. dual quad, over a single quad cpu?

    Thanks for any tips or links!

    1. Re:Does it support multithreaded queries? by Just+Some+Guy · · Score: 2, Informative

      It would seem not to. Yeah, I wish it had that, too. The other posters who keep telling you to get faster IO miss the idea of having extra CPUs handling locking, cache management, etc. so that even single running queries are faster.

      --
      Dewey, what part of this looks like authorities should be involved?
  23. Re:Nice. by tacocat · · Score: 2, Insightful

    You have made two very serious flaws with your thinking about how and why you chose MySQL. In general it's rampant with PHB thinking.

    There is the obvious discussion you didn't have when you decided MySQL was better for your company. Why would you take something as important as your company database and leave it to a vendor to support? You have no in-house knowledge of your database. You have no back-up in the event that vendor gets into a contract dispute with you. And every time you need their support on anything you have to go through this slow interface of vendor management rather than just leaning over to the company employee named Roy who lives and breathes MySQL or PostgreSQL and say, "Hey Roy! Somethings wrong with the database. I need you to fix it right now. I'll get you a pizza for lunch."

    The other error in your thinking is more elusive but this reminds me of a conversation I had with a room full of people regarding the expansion of Java at the potential cost of Perl developers.

    "I can get a whole boatload of Java developers from overseas with a phone call and 72 hours. It's very hard to find 20 or 30 Perl developers for a project."

    Nobody in that room had ever worked on a project requiring more than 5 developers. And they had worked on some largest Perl projects out there.

    Subsequently I have found a lot of really bad Java developers.

    I can have a similar discussion with MCSE in place of "Java developers".

    The flaw is that you assume popular support equates itself to good support. I think the exact opposite is more likely to be true. If someone is in need of a quick job and quick bucks, they will take the fastest and lowest entry barrier solution. First comes Am-Way. But with a week of sitting in classes for each they can quickly become a Java certified developer, MySQL DBA, or dot-NET developers. All this in three weeks time and with the credentials to prove it. Are they any good at what they do? Not likely.

    The contrary group of people are those who use PostgreSQL over MySQL or SQL Server, Linux over Windows, Perl/Python/Ruby over dot-NET or Java. They stay here and learn this less popular software because they enjoy it and find it interesting. It's generally not a decision based purely on money. It could be argued that Ruby isn't in the same camp as Perl & Python because it's having something of a feeding frenzy in the PHB camp. But that's Rails, not Ruby, and they are different.

    It is fair odds that if I put out a couple inquiries I could find PostgreSQL support in Detroit, MI (not a software haven) within 72 hours and based on it's lack of a Marketing and PR campaign the person who shows up at the door will know more about PostgreSQL and how to get it working smoothly than the MySQL counterpart who shows up at my door. And I will only need one of them as opposed to hiring 2 or 3.

  24. Just one issue by bytesex · · Score: 2, Interesting

    I'm a great fan of postgres but I ran into an irritating limitation recently; I replicate a database over a large number of very small nodes using slony. I really don't care about the integrity of the slaves - they're read-only to their clients and should I suspect they're corrupt I just reboot (they live in memory and the OS lives on a 1 Gb read-only flash drive). But postgres insists on having a WAL directory (pg_xlog) with chunks of 16MB in it. And that's big if you live in 128MB of ramdisk, and you can't turn that off. I mean, from my reasoning - the WAL isn't really used unless you do recovery; the versions of the data are in the db itself (otherwise we wouldn't need vacuum, now would we ?) So why can't I just configure postgres to not use WAL ? And then if the db is corrupt we just die. No, say the guys on IRC, you just have to recompile it with its hard-defined value of 16MB down to something lower. Yeah right. I'm not interested in hacks - I want a versatile RDBMS.

    --
    Religion is what happens when nature strikes and groupthink goes wrong.
  25. Re:Nice. by LWATCDR · · Score: 2, Interesting

    The real advantage that MySQL has right now is the number of packages that are MySQL centric.
    You need a Wiki? Odd are that it supports MySQL and can be made to work with Postgres. Need a content management system? Odds are that it was written for MySQL and might work with Postgres. So you probably already have MySQL in house so people tend to go with MySQL even when Postgres is a better solution even if for no other reason than why maintain two databases.
    The only reason why we use Postgres for several of our in house programs is because I wrote those before we put up an in house Wiki or other web stuff. Postgres offered row locking back then when MySQL didn't. I loved transactions when I finally got to use them.
    The sad thing is that if I did it over today I would probably pick MySQL since it is so popular and now supports row locking and transactions.
    Postgres is the better system but it lacks the depth of support that MySQL does. Sort of like BSD vs Windows.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  26. Re:whuh? by ahodgson · · Score: 2, Informative

    A PostgreSQL schema is just a namespace qualifier; it functions just like MySQL's cross-database joins and is conceptually similar. It isn't a full copy of your database DDL.

  27. Apples and oranges by einhverfr · · Score: 2, Informative

    One of the issues with this discussion is that there is a disjunct in the terminology used by MySQL users and that used by the rest of us.

    MySQL uses "database" and "schema" synomymously (note that their "information schema" is a separate "database"). In that sense, PostgreSQL has long had cross-schema joins in the same way MySQL does. It is just slightly harder to set things up so that you create tables in the right schemas. (hint: SET search_path='schema_name');

    In this way, I do a *lot* of work using cross-schema queries. They work like a charm on PostgreSQL.

    What PostgreSQL calls a "database" is analogous to the entire cluster of "databases" on MySQL. There is no analogy to "PostgreSQL cluster" on MySQL (i.e. a set of databases controlled by the same process, each of which contains multiple schemata). For that matter, last time I checked, there was no equivalent on Oracle either.

    So "PostgreSQL doesn't have an equivalent to MySQL's cross-db queries" is an issue of terminology rather than substance.

    At the same time, as nconway points out, PostgreSQL's MED solutions do not optimize well across distributed queries (i.e. where parts of the queries have to go through connections to other databases/servers). For MySQL users, these are like Federated tables, and I would expect similar (or worse) optimization problems in this area on MySQL. Hence when you are trying to use PostgreSQL as a distributed database, you are in for headaches. Fortunately this is not what the OP asked for :-)

    --

    LedgerSMB: Open source Accounting/ERP
  28. Re:New HOT, faster Postgres by byoung · · Score: 2, Informative

    I guess nobody appreciates humor here. Well, not if it's against the fanboys.

    I'll stand by it though-- switching to MySQL from Postgres made my life significantly simpler:

    1) you can install MySQL easily
    2) MySQL has great vendor support
    3) my experience is that MySQL performs significantly better in the general case (i.e. I'm not spending my entire life tweaking performance)

    Many an honest thing were said in jest, I suppose.