Slashdot Mirror


Top 5 Reasons People Dismiss PostgreSQL

Jane Walker writes "In an effort to dispel some of the FUD surrounding this impressive product, this article puts forth several of the most commonplace reasons for a user to dismiss PostgreSQL." From the article: "While PostgreSQL's adoption rate continues to accelerate, some folks wonder why that rate isn't even steeper given its impressive array of features. One can speculate that many of the reasons for not considering its adoption tend to be based on either outdated or misinformed sources."

48 of 704 comments (clear)

  1. Availability by Anonymous Coward · · Score: 5, Insightful

    MySQL is pre-installed by most webhosts, and does the job for most tasks.

    First post?

    1. Re:Availability by NutscrapeSucks · · Score: 5, Insightful

      I know MS Access, Access came with Office, Access is fast and easy, and Access does all the things that I need a database to do...

      (Only partially being sarcastic here. Access is fine for a lot of things. It's just the mentality that kills me. LAMP Developers are the true heir to the VB/Access Guy Mentality)

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
  2. The author, Jason Gilmore... by tcopeland · · Score: 4, Informative

    ...coauthored an excellent book on PostgreSQL that was just published by Apress. The title makes it sound like it'd be a bit light, but it takes you all the way up to writing stored procedures, writing C programs that hit the database, using all the utilities, and so forth. I'm using PostgreSQL as a Jabber backend and the book has already proved useful.

    Too bad they didn't talk about hitting PostgreSQL from Ruby... but since most folks are using ActiveRecord to do that, it's probably not a big deal. And if you use the Ruby/C client, it's quite snappy.

  3. The name by smittyoneeach · · Score: 4, Interesting

    "Postgre" is three times as long as "My".

    Then again, the P in LAMP has always been about the scripting language, not the database.

    MySQL and PHP have been quite the dynamic duo of the internet.

    That, and PostgreSQL took longer to have a native Lose32 port.

    The fact that you can bring Python right into PostgreSQL for good stored procedure justice seems to go unnoticed.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
    1. Re:The name by ZaMoose · · Score: 5, Informative

      The inventors of Ingres left the company formed around it when it was bought by Computer Associates and started developing the successor to Ingres, hence: Postgres. Make sense?

      --
      I wish I had a kryptonite cross, because then you could keep Dracula and Superman away.
    2. Re:The name by NutscrapeSucks · · Score: 4, Funny

      So, basically it's named after an in-joke about a software package that everyone forgot about 20 years ago. That's a great reason to keep it! Go Go OSS Marketing.

      --
      Whenever I hear the word 'Innovation', I reach for my pistol.
    3. Re:The name by n0-0p · · Score: 4, Funny

      Exceptionally funny coming from the man with the term "Nutscrape" in his nick.

  4. Other things... by Saeed+al-Sahaf · · Score: 5, Insightful

    Indeed. And once most people are familure with MySQL and the various tools and language support, there tends to be little reason to switch. PostgreSQL is a better database product, but many (all?) of the features that it's cheering section continue to tell us all about whenever the issue comes up, are simply not ones that the majority of MySQL users want or need. Maybe PostgreSQL fans should target Oracle usres.

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
    1. Re:Other things... by jadavis · · Score: 5, Insightful

      What about consistency? I talk to people all the time who are befuddled by MySQL's lax type checking. I know it's been hashed out before on /., but February 31st is NOT a date, and does not belong in any column named "date".

      If your application has an bug and inserts an invalid date, you don't want that error to cascade to another application (or another part in your application) and cause more errors down the line. By the time you detect the bug, it could be almost impossible to determine the source of the bug.

      Putting consistency checking in application A doesn't prevent application B from inserting invalid data. And when application A reports an error (due to it's wonderful in-application consistency checking), now you don't know what caused the error. It's long past the time that you can get meaningful state information from application B, at most you have database auditing tools that tell you "application B did it", but that's more easily implemented in PostgreSQL as well (triggers).

      And I'm not talking about super-advanced users only. I am talking about everyone who wants to catch the error early when they have the most possible information. Everyone who's just a programmer who wants to be able to trust that data from the database comes in a meaningful form. Everyone that just wants the database to do either what they expect, or throw an error.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    2. Re:Other things... by Anonymous Coward · · Score: 5, Funny
      I talk to people all the time who are befuddled by MySQL's lax type checking.

      That's why I use SQLite. Its lack of type checking is so profound, nobody has a problem grasping it!

    3. Re:Other things... by Gnight · · Score: 5, Funny
      ...February 31st is NOT a date, and does not belong in any column named "date".

      You're just jealous that your year is shorter than mine. Don't hate on me because I refuse to recognize calendars that skip days. 31 days in every month. It's gotten me in a little trouble at work though...

      Isn't this fixed in recent versions of MySQL anyways?
    4. Re:Other things... by jbolden · · Score: 4, Insightful

      I agree with you 100% (and I'm an Oracle guy). Where I think the free databases are:

      Postgres -- getting closer to the kinds of features Oracle users want. Probably about at 8i level now. OTOH speed is nowhere near Oracle

      MySQL -- Roughly the same speed as Oracle. Doesn't scale. Features ain't even close (though 5 is miles ahead of 3, another 10 years and...)

      The problem for Oracle corporation is that 95% of Oracle users don't need the features of Oracle and thus MySQL is a good replacement for them.

    5. Re:Other things... by jadavis · · Score: 4, Informative

      Isn't this fixed in recent versions of MySQL anyways?

      In the last thing I installed which is whatever came from the FreeBSD ports collection, it was still a problem. 4.1 I believe.

      As MySQL gets a lot of flack for this poor design philosophy*, they have come up with "strict mode" as a solution. That's a configuration option that is more strict about reporting errors. It's a step in the right direction, but that makes it wildly imcompatible with many MySQL applications.

      So it's "fixed" in the sense that you can optionally break backwards compatibility to fix it. I haven't heard many reports about people actually trying to use strict mode.

      * MySQL has backtracked on design philosophy before. Remember back when an ACID transaction was evil and slow and MySQL would never implement transactions or triggers or anything else?

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    6. Re:Other things... by adolfojp · · Score: 4, Insightful

      I "inherited" a badly designed MySQL database that a couple of developers were shoveling data into with their nifty little apps. Empty dates were sometimes NULL and sometimes 0000-00-00 and sometimes something else. Also, since it was designed with MyISAM tables there was no referential integrity and there were countless orphans. I am so glad that it was not a database that dealt with bank accounts.

      MySQL has never cared about enforcing database integrity and are just starting to do so. The sad part is that the vast mayority of the people that use MySQL because it is the default database don't fully understand what data integrity or consistency is.

      Cheers,
      Adolfo

    7. Re:Other things... by jadavis · · Score: 4, Insightful

      I would be interested to see some benchmarks to back that up. PostgreSQL has a lot of features that can be used to improve the speed of a query by orders of magnitude.

      What if you have a table and you need a functional index on a user defined function? MySQL can't even do that, so it will be forced to scan the whole table. PostgreSQL makes it trivial.

      PostgreSQL can also combine indexes into in-memory bitmaps before looking in the table. That means you don't have to make a multi-column index for every combination of attributes you select. This is done automatically by the planner.

      When you actually make use of some of the "features that nobody needs" in PostgreSQL, you can see huge performance gains. I'm not sure how it stacks up against Oracle, because they don't let their users publish results.

      But yeah, you're right. If you just port some MySQL code to PostgreSQL, the PostgreSQL code will likely not perform as well (unless there are joins where the planner can use some of the features like the bitmap index).

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    8. Re:Other things... by jadavis · · Score: 5, Informative

      MySQL's arguments, like it's features, always seem to be mutually exclusive.

      MySQL's benefits:
      * More Applications
      * Has strict mode if you need it
      * Easier to use by default
      * Speed
      * ACID

      The problems are:
      * Strict mode is not enabled by default
      * If strict mode is easier because of all the benefits of data consistency, then MySQL is not easy by default
      * PostgreSQL has more applications than does "MySQL Strict Mode".
      * ACID is only on the InnoDB table type, and the highest basic data access speed is on the MyISAM table type

      The list goes on. You can argue any one point and say it works just fine, and that you don't care about the other ones.

      But PostgreSQL is a whole solution. When they say you have ACID compliance, it doesn't matter what tables you operate on. When they have a reasonably consistent SQL dialect, it can't be configured to be drastically different on a whim, making half the applications (or more) not even work. In short, the features in PostgreSQL don't have long lists of dislaimers and incompatibilities with other features. They just work as advertised.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    9. Re:Other things... by jadavis · · Score: 5, Insightful

      Excellent point. That breaks isolation, and a bug in one application can still cascade problems into other applications.

      In particular this is likely to allow security problems in the application to cause malformed data to be entered into the database, thereby affecting other applications.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    10. Re:Other things... by Decibel · · Score: 4, Informative

      There are plenty on benchmarks of MySQL vs. Postgres. The Postgres people seem to dispute these but they show MySQL killing Postgres.

      Every single MySQL/PostgreSQL benchmark I've seen has either been absurdly trivial or benchmarked with MyISAM which is an apples to gorillas comparison. And they're all old benchmarks as well. Unlike MySQL's apparent philosophy of "1) Do the minimum to be able to claim we have feature XYZ 2) Make it fast 3) Maybe think about making sure it works sanely", the PostgreSQL community's top-most concern is data quality; performance is always seconday to that. Because of that there had been a lot of room for improvement through the 7.3/7.4 timeframe.

      That's no longer the case. People commonly see 30%+ speed improvements from 7.4 to 8.0, and 2x that from 7.4 to 8.1. And more improvements are on the way. 8.2 is looking to have on-disk sorts that are 4x faster than today, as an example.

    11. Re:Other things... by Lispy · · Score: 5, Funny

      Basically once I retire I have this scheme to sue all sorts of companies for getting paid on a monthly basis but providing less service in February or even in a 30 days month. This should keep me busy til I die and sounds like a fun petproject to manage from my couch. :)

  5. Web developers... by schon · · Score: 5, Interesting

    I think first and foremost is that is web developers who don't understand SQL, and so go about happily re-inventing its functionality in their web apps.

    99% of the problems that web developers face have already been solved for them, but they think that SQL is just a data dump, and thus see no reason to use Postgres, because they think that MySQL does everything they need. In reality, their apps would be faster to write and easier to maintain if they used SQL features.

    It's kind of like perl-syndrome, but on a larger scale.

    1. Re:Web developers... by syphax · · Score: 4, Insightful


      I think what the grandparent meant is that a database can do more than handle SELECT, UPDATE, and INSERT queries, and that web apps that use DB backends contain a lot of code for functionality that could have been handled more efficiently and cleanly by the DB itself.

      Ironically, I think your post kind of validates the grandparent, in that you seem to implicitly be thinking of SQL databases as little more than a better place to store data than a flat file.

      Cheers.

      --
      Simple Unexpected Concrete Credible Emotional Stories
    2. Re:Web developers... by ttfkam · · Score: 4, Funny

      I could tell you, but it'll take me a while to explain it in just one line.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    3. Re:Web developers... by schon · · Score: 4, Interesting

      perl-syndrome is the nasty habit that perl programmers get into (some might call it a mild case of brain damage), wherein when presented with a problem, say "oh, that's easy - it will only take me 10 minutes to whip up a perl script" rather than using an existing tool that does the same thing, easier, with much less hassle and opportunity for error.

      An example:

      Newbie-admin asks "how do you make your syslog files go to a different machine?"

      Perl-syndrome admin says "oh, that's easy - just write a quick perl script to tail the log files you want, then open a TCP connection to a perl script on the remote machine to write the data. I could write that in 15 minutes!"

      Experienced-admin says "Why don't you just configure syslog to send the files to the remote machine? It takes all of 5 seconds."

      perl-syndrome admin "TMTOWTDI!"

      (and yes, this exchange *really* happened, but it's not the only one - I've seen lots of other examples of guys with perl-syndrome posting perl scripts that could be done much easier with things like sed and awk.)

    4. Re:Web developers... by EABinGA · · Score: 4, Funny

      From bash.org Quote #6618

      Jon^D: I had to cat 8-9 seperate quote files, compare each line in each of them to make sure there weren't any duplicates then sort

      Jon^D: I wrote a nasty perl script to get it done

      Jon^D: and it didn't work very well

      skank: cat quote*.txt |sort |uniq

    5. Re:Web developers... by phsdv · · Score: 4, Informative
      you do not even need 3 different commands, and certanly no pipes:

      sort -u quote*.txt
  6. Nobody's heard of it by Dlugar · · Score: 4, Interesting

    The biggest reason I've found personally why people don't use postgres is because they've never heard of it. Everybody and their dog has heard of mysql, but I've never found somebody who knows about postgres who isn't actually using it. mysql, for whatever reason, just has better marketing.

    Why that is I'm not entirely sure, since ever since I discovered postgres, mysql has been relegated to the role of "use-only-when-a-stupid-web-app-can't-use-anything -else". If I want a toy database, I'll use sqlite. If I want a real database, I'll use postgres. There really isn't much room in between the two.

    Dlugar

    --
    Computer Go: Writing Software to Play the Ancient Game of Go
  7. Interesting article, but not the reasons I hear by dskoll · · Score: 5, Interesting

    I don't hear those reasons when people dismiss PostgreSQL. The ones I hear are:

    • VACUUM is a pain. It's true that VACUUM is annoying, but later releases (especially 8.0 and 8.1) make VACUUM much more tolerable; we have customers whose databases are busy 24/7, and although the load does go up during a VACUUM, the database is still perfectly usable.
    • PostgreSQL is slow. That was true, but the 8.x series has improved performance dramatically.
    • PostgreSQL is hard to install and administer. Really, I think this is a matter of taste. If you are used to MySQL, then yes, there is a learning curve. OTOH, I'm used to PostgreSQL and find myself having to learn MySQL, and MySQL feels just as weird and unintuitive to me as PostgreSQL might to a long-time PostgreSQL user.
    1. Re:Interesting article, but not the reasons I hear by The+Master+Control+P · · Score: 4, Funny
      OTOH, I'm used to PostgreSQL and find myself having to learn MySQL, and MySQL feels just as weird and unintuitive to me as PostgreSQL might to a long-time PostgreSQL user.
      So, what you're saying is... PostgreSQL will be strange and unintuitive, no matter what database you prefer and use? :P
  8. Number 1 (missing) reason by malraid · · Score: 4, Insightful

    Their database (MySQL, Access, Oracle, whatever) is working for them good enough to justify switching. Me? I'm using PostgreSQL, and I won't switch, even though Oracle now has a free version. Too much work to fix something that's not broken. And while I might never be able to use MySQL in my main project because it lacks some features I really need, it's good enough for lots of people.

    --
    please excuse my apathy
  9. #1 Reason by __aanonl8035 · · Score: 5, Insightful

    It has to do with mindshare and previous history. Way back in the day... 1997, postgres was difficult to setup for some people. It was not the default choice included in many setups at ISPs. If you wanted to have an interactive web application at an ISP, on a unix machine, the most common option was MySQL. (On a windows machine it would be an ODBC connection to an access database, or a MS SQL server) Once something has achieved a significant mindshare and some momentum it is difficult to overcome. (But not impossible, especially if you do a better job, just takes time)

  10. I know, I know! by Trogre · · Score: 4, Funny

    Why do people dismiss PostgreSQL

    It's because LAMP sounds so much cooler than LAPP!

    --
    "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
  11. Fulltext Indexes by inio · · Score: 4, Insightful

    I have pretty simple requirements for a database, I don't need triggers, stored procedures, or any of that stuff. What I need for web applications is a database that I can efficiently search, and that means fulltext indexes. Sure, there's plugins for Postgres that add fulltext indexes, but they require ungodly complex setup and tuning. With MySQL it's two keywords.

  12. BullShit by slashpot · · Score: 5, Funny

    #1 because we're lazy ass sys admins who learned mysql first and don't want to bother learning another software package that does more or less the same shit . sad . true .

  13. There are other reasons by Martin+Foster · · Score: 5, Informative

    PostgreSQL is not necessarily the easiest beast in the world to get going. A few years back, I converted a chat/gallery portal system Ethereal Realms (http://www.erealms.org/ from MySQL to PostgreSQL, since at the time it was felt that features like proper referential integrity and stored procedures would really pay off.

    The code was shortened considerably, was more stable overall and the OpenBSD port compiles properly without threading issues. However, despite all of those advantages and the database server being on a bigger server with more memory performance suffered considerably.

    Want a good starting place in settings? The default documentation does little if anything to really help you on the matter, its like trying to learn the English language solely through the use of a dictionary.

    There are tutorials available, some out of date and while Usenets can certainly help, you'll get wildly varying answers because some of the configuration options are more black magic then science. Rather makes it hard to get started when you don't know exactly where to start or how increasing a value will really affect performance as a whole. You are expected to load test the database before implementation which is not always possible for small hobby sites, and it can test patience.

    With MySQL you had a few configuration files designed for use in various environments and it would show you how certain settings had changed. This is not the case with PostgreSQL in fact 32 connections is the default which is painfully inadequate for most peoples needs when dealing with a site. I'd personally love to see an application that detected your memory and other settings and came out with sane settings, at least with such an option you'd have a place to start.

    Queries were slow, but then that was supposed to be MySQL's strength. Solution? Run explain/analyze on everything and tweak the hell out of every single query being generated. If you don't necessarily understand how the query is analyzed and run by PostgreSQL then there must be something wrong with you!

    Vacuum? That concept alone can throw people in for a loop, especially when designing a system which is meant to be run by people with no technical experience. So you have to code in a serious amount of intelligence into the application or rely on Auto-Vacuum (not available at the time) which can slow performance down even more.

    Because of vacuum, I had to design a process for the site to lock out all users. This had never been required under MySQL and took a while for the users to get used to. In certain cases, if the lock-out failed, the vacuum would cause permanent locks in tables which would quickly pile up scripts on the webserver side leading to extreme high loads or just crashing the machine.

    PostgreSQL has a LOT of features and a lot to offer in general. However, there is a major learning curve required to get it going right. I've had other sites implement the code and whenever they hit the version which required PostgreSQL most gave up on the idea of migrating or complained endlessly on how things seemed sluggish. That is NOT a major selling point when trying to get the unwashed masses to adopt your product.

  14. No newbie guides by kyndig · · Score: 4, Interesting

    When I started programming a website, I knew I needed a database. I also knew absolutely nothing about php, sql, or even what they stood for. I was using a Perl based hacked link farm that used a flat-text database storage. Someone then pointed me to a php link farm that used MySQL. The installation text that came with the app was so easy to follow for a newbie, I had the link farm up and running in no time. I went to Books-A-Million a few weeks later, and found many books on PHP, MySQL, php/mysql - and nothing on PostgreSQL. When I finally did read up on RDBMS, found out that PostgreSQL did some functionality that MySQL didn't (at the time); I already had most of my site designed in php/mysql. I looked more into sub-queries in PostgreSQL, but the community structure was so scattered and non-newbie friendly, I decided to stick it out with MySQL (and havn't regretted it once). So my reasons for preference have nothing to do with wanting a windows version, different language, or other such assumption. Instead, my reasons are:
          * as everyone says, the name is catchy: MySQL
          * when I first was introduced to it, and to this day, Michael 'Monty' Widenius takes a personal interest in his work, and is a real down to earth guy ( had the pleasure of emailing him once) [you can probably still see him posting on the mysql dev lists these days..though I havn't followed it in a couple of years]
          * Extensive script language support for web development
          * Books for newbs and professionals (many books)
          * I like their website more..always have

    My shallow reasons..

    --
    My Thoughts, Kyndig
  15. Re:Or this? by rtaylor · · Score: 5, Insightful

    Do you really only have one user using the database at any given time? If you do only have one user, speed probably doesn't matter at all.

    Benchmarks like that should be run with a couple of hundred active users all doing different things (mix of updates, insert, deletes, and selects) -- a real world use-case.

    You will quickly find that scores change.

    We had a MySQL versus PostgreSQL battle once. The MySQL people put together a benchmark showing MySQL was nearly 10 times faster. The benchmark was a single user going through the steps.

    We then took the exact same thing and put Apache in front and benchmarked with 5 active users -- now they were about even. At 10 users PostgreSQL was about 5x faster. At 100 users MySQL was unable to finish the test. PostgreSQL was serving each of the 100 users at a rate comparable to how it dealt with 10 active users.

    Benchmarks for benchmark sake is useless. Benchmarks that model your actual use case are quite valuable.

    --
    Rod Taylor
  16. I avoid it.... by drgroove · · Score: 5, Funny

    ...because I don't know how to pronounce it.

    Is it "Post Grace"? "Post Grey"? "Poss Grey"? "Poss Gres"? "Progress"? "Platypus"? "Post Raisin Bran"?

    Whatever it is, it sounds vaguely French, which is just suspect to begin with. And I'm not dredging up the whole Iraq/UN thing either, although if I have to invoke Freedom Fries to make a point, I've got the mayonnaise ready.

    Give me a RDBMS that I can pronounce, and I'll use you in my software.
    MySQL. Easy. "My SQL". Doesn't get much easier than that, plus it sounds sorta friendly.
    MS SQL - same thing, slightly different spelling. Maybe not as friendly, but you can put it in a Powerpoint to your boss and not sound like an idiot.
    Oracle. Now you're talking. Even has a bit of mistique to it, a bit of enigma.
    DB2. Not as sexy, but still undeniably pronouceable.
    Sybase. Sock it to me.

    What PostgreSQL - however the hell you say that - really needs is a new name. Forget features, forget marketing, forget RDBMS death match performance comparisons. Nobody cares. MySQL lacked tons of features for years, and we all used it then and continue to use it now. Why? You can pronounce it. Simple.

  17. Why I chose MySQL by Reality+Master+101 · · Score: 4, Insightful
    First, let me say that one of my "real" sites uses PostgreSQL, has used it for about six years, and I'm very happy with it. It was the right decision.

    Now, about a year ago, I had a client that wanted a web site back-end written. Now, I wasn't sure what the future of that site was going to be, whether I was going to be involved, etc. I also knew that it would be probably be run on inexpensive shared hosting solutions.

    Guess what I chose? MySQL and PHP. The reason was because those are always available. It gives my client the flexibility to move it to any hosting solution. PostgreSQL simply is not everywhere. In my case, I run my own servers and can afford to have to understand it. But my client needs a hosting solution that does all the work for him (including back-ups). There's something to be said for using "the standard".

    And you know what? I originally chose PostgreSQL because it was ACID compliant, but I have to say that MySQL sucks a lot less than it used to. It defaults to tables that support commit/rollback. It supports sub-transactions (which PostgreSQL v7 doesn't support, not sure about 8). It (FINALLY) supports sub-selects. If you're still turning up your nose at MySQL, it really isn't as bad as it used to be.

    --
    Sometimes it's best to just let stupid people be stupid.
  18. Re:Why I'd rather not use PostgreSQL by RelliK · · Score: 4, Informative
    I was a big fan... until I needed to use PostgreSQL 7 for a real (commercially available) product. To call it slow would be an abomination of the word. Slow doesn't even begin to describe b-tree insert times. Yes, I tuned the engine and dropped indexes at the appropriate times. Yes, my data structures were relational. Yes, this contradicts some published benchmarks. My use is real world and in reality, PostgreSQL is slow... and a bit buggy.

    Absolute bullshit. I've used PostgreSQL myself in a mission-critical production app for the past 3 years. (I've since left the company, but the app is still in use.) I have been consistently impressed by the quality and performance. There was a strong push to use mysql when the project started since the company already had in-house knowledge of it. Performance was one of the concernes. So I ran the benchmarks. Read performance of simple selects was inconclusive: mysql won some, and postgresql won some. However, postgresql consistently won write tests and scaled better as I added more client threads.

    Nested parentheses in SQL can cause an engine crash. " like ... (SELECT A INNER JOIN B) INNER JOIN ..." But the crashing is tolerable. Hand-holding the query optimizer is not. Quite often, the optimizer gets the query plan wrong. Sending special commands to disable internal features is often the only resort.

    Bullshit again. Never ever seen that or even heard about it. Again, at my last job postgresql was part of a mission-critical application, and I've used it for a couple of projects before that too. The *only* time I've seen postgresql go down was when we ran out of disk space. And even then, it was not a crash but a clean shutdown. Give me a specific example of a query that you say caused postgresql to crash. Otherwise I'll assume you are yet another troll.

    While it's true that PostgreSQL is more database than most corporate weenies need, it falls down in moderate write environments. It's best used for systems that write data very infrequently, otherwise it fragments quickly. The only solution to table and database fragmentation is dump & reload.

    Bullshit 3x. The app I was talking about was used for tracking work in a 3d production pipeline with a staff of ~300 artists. There was *a lot* of writes. (every checkin, every render, etc.) By the end of the project the database grew to over 10G. And postgresql didn't even blink.

    Vacuum is asinine. Any command that needs to be run periodically under threat of complete and total data corruption should not be. That's right. Only PostgreSQL makes you vacuum or else your transaction ids overflow. This is modern? I'm shocked.

    And your point is? All it requires is a single entry in crontab. And you can still run transactions while it's vacuuming. Really, what is your problem with it? It is no different than running a cronjob to do a backup, or a similar maintenance. And since 8.0 and up, postgresql does autovacuum, so you don't even have to worry about that.

    So, in short, from my experience PostgreSQL Just Works (TM). And unlike oracle it doesn't cost an arm and a leg, and doesn't require an army of DBAs and sysadmins to maintain it.

    --
    ___
    If you think big enough, you'll never have to do it.
  19. Reason number 6 by porkThreeWays · · Score: 4, Insightful

    Reason number 6 is the damnned Postgres zealots that feel the need to bash everyone else's database rather than promote their own. I use MySQL and Postgres on a regular basis. I'm proficient in both. And to the dismay of Postgres users everywhere, there are times which *gasp* MySQL is better suited. "Oh, you are probably a lame programmer and use it for trivial web stuff". Not true! I look at a project and each databases strenths. It has nothing to do with the seriousness of an application. When I was writing VoIP billing software, we'd sometimes see 4-5 million CDR's (call detail records) in a single day. Our first iteration actually used Postgres and choked on that many records. We had to make some compromises with MySQL. We had an additional field for Unix epoch time because of MySQL's lacking (at the time) date and time math. There was a tradeoff. It was deemed that having billing invoices generate in 5 seconds (as opposed to 5 minutes) was more important than programmer time. Welcome to the real world. Another project I had was for writing worker punchcard system. Six months of records only topped out at 50,000 records and we decided Postgres' procedural languages would be a great help to us. Lose the zealots and attitude and maybe you'll have a greater user base.

    --
    If an officer ever threatens to taze you, say you have a pacemaker.
    1. Re:Reason number 6 by jadavis · · Score: 5, Informative

      My reply was apt. The parent said that there was little reason to switch, I gave some reasons. I stated a fact (that MySQL thinks Feb 31st is a date), which is not bashing. It looks like bashing because it makes MySQL look bad.

      I don't have a problem with other databases. The only database that, to me, stands out as particularly bad is MySQL. That's because their marketing deceives many people.

      Someone may see:
      1. "MySQL supports strict SQL compliance mode"
      2. "MySQL is easy to use from the default install"
      3. "MySQL is screaming fast"
      4. "MySQL has transactions"
      5. "MySQL has more applications written for it than PostgreSQL"

      But...
      #1 conflicts with #2 and #5 because strict is off by default, and there are fewer "MySQL Strict Mode" apps than PostgreSQL apps.
      #2 conflicts with #4 because the default install and CREATE TABLE create MyISAM tables which do not support transactions.
      #3 conflicts with #4 because the "screaming fast" reputation is from MyISAM tables. InnoDB is somewhat similar in performance to PostgreSQL.

      Everything about MySQL pigeonholes you into a subset of the features that MySQL AB advertises, and then makes it as difficult as possible to roam between those features. In MySQL, if you need to change the type of a table, for instance if you want transactions, you can't do that without disrupting running applications. You need to pause and resume all the applications accessing that table.

      Compare to PostgreSQL, if you need to, for example, change the disk that a table is stored on (of course PostgreSQL doesn't have different table types), you can make all the necessary DDL modifications in a transaction-safe way, and the application will never know the difference.

      I know MySQL has uses. I use it (sparingly). Slashdot uses it, for good reasons I'm sure. But "has it's uses" does not mean "immune from criticism".

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
    2. Re:Reason number 6 by dj-nix · · Score: 5, Interesting

      Well, thats funny, because I also have had to write VoIP billing software, and am currently writing IP traffic rating and billing software. When I first started this type of business 5 years ago it was with MySQL, but I was frequently both crashing MySQL and getting junk data in my tables (The biggest problem being invalid dates!) When I started searching for a better option I tried a number of databases including FireBird and Postgresql but settled on Postgresql for 4 major reasons. 1) It has absolutely brilliant Date and Time handling, better even than Oracle. 2) It has native INET support which allows easy manipulation, sorting and searching of IP addresses. 3) It has SUB SELECT support which allowed me to reduce my application code a lot, by making the DB do the work (Always a good tradeoff in my opinion) 4) It has VIEW support which allowed me to generate some "simple" views of the data including some summaries which allowed the management to play to their hearts content with MS Access (As a frontend to PG) without having to understand the "real" data layout.
      Of course since then I have discovered many more things to love about Postgresql, including triggers and stored procedures etc (To be fair, MySQL has some of these features now, but did not at that time)
      Just to be clear my first Postgresql app handled ~5 million VoIP records per day on a single CPU, single disk desktop class machine and the only time I have EVER had Postgresql crash was due to a bad ram chip in server! Conversely, I can't count the number of time I and my customers have lost data with MySQL.

  20. Re:One query - select count(*) from .... by linuxhansl · · Score: 4, Informative
    Try count(*) on an InnoDB or BerkeleyDB table... Same thing. Or try anything that does not count the entire table (in that case every database has to do a table or index scan).

    Either you want transactional safety or you don't. If you don't use MySQL with MyISAM tables and have fast count(*), if you do use InnoDB (or better use PostgreSQL), but then there's no single count(*) that can be stored with the table since every transaction may see a different count(*).

    The cool think about MySQL is that you do have the option (with Table-Engines). The cool thing about PostgreSQL are its advanced featured... One example: Hands up, who here knows what a partial index is?

    In PostgreSQL you can setup indexes that only cover a part of the table (for example if you have an active flag on a table and most queries are on active entries, you can have a partial index only on rows that have active=true, and this can speed up things *significantly*); alas most folks even have not even heard about partial indexes, and that is why they do not appreciate PostgreSQL.

    This is just one example.

  21. A few more reasons by jdoeii · · Score: 4, Insightful
    VACUUM is a pain. It's true that VACUUM is annoying, but later releases (especially 8.0 and 8.1) make VACUUM much more tolerable;

    Vacuum kills performance. Some uses maybe OK with loosing 50% or more while VACUUM runs. In some uses it's unacceptable. In our case (a lot of inserts with majority of selects going for the newly inserted records) performance degrades within 6-8 hours after running VACUUM & friends. VACUUM takes ~20 minutes to complete which is completely unacceptable during the day and we can't delay it till night.

    No, AUTOVACUUM is not an answer because it kicks in unexpectedly and makes random queries run unexpectedly slow at unexpected times. Usual VACUUM makes all queries run slow at predetermined time. Not a very appealing choice.

    More reasons:
    • No memory management. For example, here is 1GB database on a dedicated host with 2GB of RAM. PG should suck the while DB into RAM and run selects from there, right? Wrong. PG is extremely frugal about memory management. It caches the last few results, but otherwise goes to disk for data even if there is anough RAM to cache the whole DB. The PG developers keep saying that it's the job for the OS. Now, which OS should we use then? FreeBSD, Linux, Windows? Which one?
    • Forever broken COUNT(). Although MIN & MAX were fixed in the latest release, COUNT() is still broken and there is no fixing in sight. Yes, I beieve 10 seconds execution time for count() on a table with just a few million records qualifies it as a broken feature.
    • Of course, the query optimizer/planner can be improved, but that's understandable and can be applied to pretty much any DBMS
  22. Sometimes the tool IS the problem by WebCowboy · · Score: 4, Insightful

    My point is that the tool is not always the problem. Now if C++'s integer arithmetic had an issue, that is another story, but the programmer simply was not good.

    No, the tool IS part of the problem in such cases. If the programmer was not that good at C then C was the wrong tool and thus part of the problem. The programmer should've taken the time to study up on C, or picked a different tool. There are times when the tool is not appropriate for the job--you probably shouldn't use C if you need to do heavy text processing and need to get the job done fast (use Perl instead), or if you are less experienced and want a language that supports sound object-oriented programming maybe try Python, etc.

    MySQL was not designed as a robust relational database, and its creators didn't seem to be intent on making it so, or else they'd have designed it differently. It was designed as a very quick and quite dirty SQL frontend/ISAM backend system to support small, informal databases (or so it seems): Basically, its heritage is to be like the old Ashton-Tate dBase but using SQL to query the tables. Since then it has lost that focus and now we have large websites storing millions of records in mySQL.

    MySQL is a great tool if used as intended, however it definitely IS a problem if your accounting system uses it for example. People started doing crap like that and complained about mySQL's lack of features, thus we have things tacked on like innoDB tables and such to add this robustness.

    PostgreSQL was not always as super-robust as it is now, and in its present form its source code is probably almost unrecognisable from 10 years ago, however its architecture was more sound and thought out from the start, as its heritage was as an academic project. Its challenge was not to add features as was the case with mySQL--PgSQL was designed for extensibility. PostgreSQL had to catch up in performance and stability, which it has done in spades.

    Personally, I always use UNIX timestamps (seconds since 1970). They can be directly added, sorted, and converted into any timezone, and its very portable. But thats just me. (Yes, UNIX timestamps do nothing before 1970, etc, etc).

    It seems somehow wrong that your business logic has to perform low-level validation of basic datatypes, and it is cumbersome and error-prone to deal with unrecognisable representations. Only the geekiest of geeks could tell me whether 1984293617 falls on a Thursday without runing it through some kind of conversion program (simple as that may be for a geek). What about people who point-and-click their way through some report designer--they're gonna have to deal with some giant integer in a column entitled "something-date". The other problem is that it is not very precise for some applications that need sub-second timestamp values.

    Personally, I like PostgreSQL because it accepts ISO standard formats, you don't need to do anything to convert timezones--you simply specify the time zone when you insert or query and it issmart enough to figure it out when you query fordatain Eastern time zone and it was inserted in Pacific timezone. Furthermore, it knows Feb 30 isn't valid, and knows when leap years occur, and can format the date in many different ways with simple built-in functions, can be accurate to the millisecond and won't crash and burn in 2038.

    FYI, I believe the "seconds since UNIX epoch" representation of date/time values is a SIGNED integer, so they are in fact good for earlier dates than 1970 (they are good to some time in late 1901 in fact). That is still a pretty limited range and why early systems didn't use that representation inmany cases (couldn't store birthdates for a lot of people who were still alive in the early 1970s becasue they were born before 1901). It is still a problem in some applications ad that is why 32-bit "UNIX-style" time is discouraged.

    I think it's a shame that people resort to such kludges without adequately lookig for more appropriate alternatives...but that's just me ;-)

  23. What an attitude by WebCowboy · · Score: 4, Insightful

    I can't be bothered to learn something new when it seems everything supports MySQL.

    I'm glad you don't work for me with that attitude. I'd rather work with someone who is interested in learning new things and will bring some creativity to the job. People of your mentality have to be careful they don't fall into the "false laziness" trap--using some tool or technique or techology because you are too lazy to learn something new, only to end up doing load of extra work to avoid the shortcomings of your inappropriate design choices. The result is scads of legacy code at higher layers of an application to handle things like datatype verification, basic referential integrity and so on.

    All the various different executables to do different tasks rather then one shell like MySQL, a permission system which seemed from my limited usage more perverse then MySQL's

    I've never found it to be a major struggle to use PostgreSQL, though being a more full-featured database it will naturally be a bit more complex to manage.
    I'm puzzled about the "all the various executables" part too, since many of them were invocable from the psql shell anyways. Also, it sounds like you've not lookded at PostgreSQL for awhile because its permissions system has undergone a lot of work--certainly it can be complex but it is very flexible and powerful, and honestly it gets rid of most excuses you had to execute all your database operations under the database superuser (or some other single user account) in your backend code.

    I have better things to do with my time, like write cool code that uses MySQL.

    You might want to examine how you used your time...if you had spent a few hours or a couple days learning something new for a change (like PostgreSQL) then it might've saved weeks or hours of frustration trying to use mySQL for too-complex tasks.

    MySQL might have grownup a lot in recent years, but at its heart it was meant for much more modest tasks, like storing guestbook entries, record collections, as a temporary datastore/embedded database, high-performance querying of relatively static ad/or non-critical data and so on.

  24. Comment removed by account_deleted · · Score: 5, Insightful

    Comment removed based on user account deletion