Slashdot Mirror


PostgreSQL 8.0 Enters Beta

gavinroy writes "As announced in pgsql-announce, PostgreSQL 8.0 Beta is now available. New features include native win32 support, Point in Time Recovery, Tablespaces, and much more! here is the beta history if you want more information."

89 of 368 comments (clear)

  1. You can save a few clicks... by tcopeland · · Score: 5, Informative

    ...and jump right to the beta announcement message.

    1. Re:You can save a few clicks... by ahodgson · · Score: 2, Informative

      Since 7.0 PostgreSQL has been pretty fast, assuming you tune it a little. Admittedly some of the default tunings are rather lame.

      The concurrent versioning system means some operations are inherently fairly slow (like updates), but it also allows very limited locking and writers don't prohibit readers from viewing data, which in a multi-user environment is very nice.

      Most slowness users experience when starting with PostgreSQL is due to them being used to MySQL and not understanding how to do things in a fast way. For instance, every operation is implicitly a transaction. If you want to do multiple inserts at once, wrap them in a single transaction, and they'll be way faster than doing multiple separate transactions without even knowing you're doing that. Things like that will really speed up your experience.

      There are lots of ways to make PostgreSQL fly, but it does take more work than MySQL. On the other hand, PostgreSQL won't eat your data. Depends what you value more I suppose.

  2. where to download by jbellis · · Score: 5, Informative

    http://developer.postgresql.org/beta.php

    the windows installer is at
    http://pgfoundry.org/projects/pginstaller

  3. BitTorrent Downloads by Anonymous Coward · · Score: 5, Informative

    http://bt.postgresql.org

  4. Bittorrent [was Re:where to download] by dfetter · · Score: 4, Informative

    http://bt.postgresql.org

    Join the torrent! :)

    --
    What part of "A well regulated militia" do you not understand?
  5. I recommend Mysql users to take a look at PG by xutopia · · Score: 4, Insightful

    it is the most advanced Open Source database there is. If anything pissed you off with MySQL chances are Postgresql will have a solution for you.

    1. Re:I recommend Mysql users to take a look at PG by leperkuhn · · Score: 2, Interesting

      Except ready to go full text searching, the ONLY thing keeping me on mysql.

      --
      http://www.rustyrazorblade.com
    2. Re:I recommend Mysql users to take a look at PG by junkymailbox · · Score: 2, Interesting

      Is database replication and fail over working yet?

    3. Re:I recommend Mysql users to take a look at PG by Jason+Earl · · Score: 5, Informative

      While it is true that the PostgreSQL project doesn't include full text searching there is a full text searching engine for PostgreSQL. The "problem" is that it is licensed under the GPL, not a BSD-style license, and so it is not included in the official distribution. Here's the link.

      OpenFTS has been around for quite a while, and is used pretty heavily, so there really is very little reason to put up with MySQL's many shortcomings.

    4. Re:I recommend Mysql users to take a look at PG by rtaylor · · Score: 5, Informative

      In short, yes and perhaps.

      Replication (master & multiple slaves) works great with Slony.

      Fail over should not be done by the database, but by the operating system or an external monitoring system (Big Brother). RedHat Enterprise with the standard failover configuration works fine.

      You just need to tell Slony that the new node has been elected as master. It's not as clean as it could be (no gui tools, etc.) but it is functional enough for the .org servers (Affilias).

      --
      Rod Taylor
    5. Re:I recommend Mysql users to take a look at PG by Svennig · · Score: 5, Interesting
      Okay, I'll bite

      Stored Procedures. They arent functions. Functions are different. Functions should be called inline, from within SQL statements. There should be a difference.

      When looking towards migrating to an OSS database from MS SQL Server I looked into how easy it was to use the postgres stored procedure/functions/things. I couldn't find any equivalent of returing a resultset. In MS SQL you use:

      CREATE PROCEDURE name AS select * from test

      The only way that I could find to do that in postgres was:

      1. Return a cursor reference, in which case throuch JDBC you need to obtain this horrid postgres specific class from the driver.
      2. Return a set of results (or was it records, my mind fails me), but I couldn't get this to work
      3. Return a set of created types, but this doesnt work well for dynamic queries and makes maintainance a headache - you'd end up defining hundreds of types!
      4. So it seems that we're stuck with MS SQL server.

        If someone DOES know how to do this is a non-evil manner, please tell me! Were planning on doing an upgrade, and I'd rather not have to fork out the money for SQL Server licences etc...

    6. Re:I recommend Mysql users to take a look at PG by JamesKPolk · · Score: 5, Informative

      Using postgresql 7.4.2:

      create function testfunction()
      returns setof record
      as 'select name from companies;'
      language sql;

      select name from testfunction() as names(name char(50));

      That will print all the company names in my database.

    7. Re:I recommend Mysql users to take a look at PG by rycamor · · Score: 2, Informative
      PostgreSQL doesn't do "implicit" set-returning like this, but it is quite ease to get something almost as simple if you use SQL as your procedural language, instead of PL/pgSQL:
      create function GetEmployees?() returns setof employee as select * from employee; language 'sql';
      Not too bad, huh? Here's a short article on set-returning functions.
    8. Re:I recommend Mysql users to take a look at PG by JamesKPolk · · Score: 3, Informative

      And yes, I could add arguments to that:

      create function testfunction(numeric)
      returns setof record
      as 'select name from companies where length(name) < $1;'
      language sql;

      Obviously this is a simplified example, but you get the idea. And I assume that this capability extends to other embedded language like perl or ruby.

    9. Re:I recommend Mysql users to take a look at PG by Spoke · · Score: 2, Interesting

      Sweet, replication was the main thing that MySQL supported and was easy to setup that PostgreSQL was lacking.

      Now that PostgresQL has got good Open Source replication available, I expect to see a lot more people migrate to PostgreSQL. I'll be testing out PostgreSQL + Slony shortly.

    10. Re:I recommend Mysql users to take a look at PG by Ragica · · Score: 4, Informative
      "tsearch2" which openfts is based on is BSD licenced, and included in the PostgreSQL contrib package. It's pretty good, and all you need for creating full text searchable indexes.

      The documentation describes the differences between tsearch2 and openfts like this:

      OpenFTS is a middleware between application and database, so it uses tsearch2 as a storage, while database engine is used as a query executor (searching). Everything else (parsing of documents, query processing, linguistics) carry outs on client side. That's why OpenFTS has its own configuration table (fts_conf) and works with its own set of dictionaries. OpenFTS is more flexible, because it could be used in multi-server architecture with separated machines for repository of documents (documents could be stored in file system), database and query engine.

    11. Re:I recommend Mysql users to take a look at PG by danharan · · Score: 2, Interesting
      If anything pissed you off with MySQL
      Heh... you're kidding, right?

      There are enough MySQL gotchas to drive anyone used to Oracle up the psych ward walls.

      Every web developer I know keeps raving about the speed of MySQL... when I show them my database schema, it's usually the first time they've seen a 58 table database. It seems huge and unmanageable if you're used to 1-5 tables, and it most certainly isn't easy without triggers, stored procedures and foreign keys or any of the more complex functions and queries you need when dealing with normalized data.

      MySQL really is a great little database for simple read-intensive applications. But it sure as hell feels like a toy to me.
      --
      Information: "I want to be anthropomorphized"
    12. Re:I recommend Mysql users to take a look at PG by Sunda666 · · Score: 3, Informative

      it has binary dumps for quite a while now...

      pg_dump --format=c

      peace

      --


      ``If a program can't rewrite its own code, what good is it?'' - Mel
  6. Die IT theme by ScytheBlade1 · · Score: 4, Funny
  7. Can it Compete with Oracle or DB2? by Greyfox · · Score: 4, Interesting
    I was interviewing with a company a while back that was planning to move from an Oracle based set-up to a Postgres based one. They were pushing enough data around daily that they were having to redesign their collector software to be more efficient, so I was somewhat concerned that Postgres wouldn't give them the performance they needed, but I haven't really seen enough of it to be able to comment.

    On the other hand, I've seen both Oracle and DB2 corrupt indexes and database table data in various circumstances (Usually the failing of a DBA in some capacity or other.) I'd be curious to see how the various databases stack up against each other without the hype that most of the parties that publish such studies usually bring to the table.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    1. Re:Can it Compete with Oracle or DB2? by rtaylor · · Score: 5, Informative

      PostgreSQL is a touch slower than Oracle in some special cases (single user on multi-cpu machine doing large or very complex queries) since Oracle can split the work up amongst CPUs.

      With 50 to 100 users, both have similar performance for many workloads (you need to test your specific workload), but Pg may require a touch more tuning.

      Pg is, however, quite a bit more reliable than Oracle as far as corruptions go (keeping in mind this is a .0 release) so long as the hardware is adequate (doesn't lie about writes hitting disk when they're really in cache).

      There are ways of purposfully crashing PostgreSQL as an authenticated user (particularly if you have root access and can write functions in C), but in standard operation it's quite reliable.

      I cannot speak for DB2, but based on their Docs I think Pg is nearly as feature complete in most areas, and much more complete in many others.

      --
      Rod Taylor
    2. Re:Can it Compete with Oracle or DB2? by ron_ivi · · Score: 3, Informative
      Computerworld had an interesting article of the case when PostgreSQL beat Oracle(cool) to enable Afilias to power the .org domain when they took it away from Verisign (also cool).

      Here's the ISOC's response to Oracle FUD.

      We believe that the key point relating to databases for the .ORG
      redelegation is not which database the operator is using, but,
      rather, whether the database will support the .ORG registry in a
      stable, scalable, and highly available manner.

      Afilias has over a year of experience running a large scale gTLD
      registry--the .INFO registry. This direct experience, the load &
      stress tests conducted by Afilias (and listed in our proposal
      <http://www.icann.org/tlds/org/applicati ons/isoc/section3.html#c17.10>),
      and Afilias' compliance with ICANN's service level requirements clearly
      demonstrate that the PostgreSQL database used by Afilias performs
      at the level of reliability and availability required for the
      mission critical operations of a global gTLD registry.

      Further, the actual operating performance record of Afilias compares
      very favorably to the records of the other .ORG applicants, many of
      whom use commercial databases. A review of each bidder.s answers to
      Question 14 <http://www.icann.org/tlds/org/questions-to-applic ants-14.htm>
      illustrates the kind of hard data and real world registry experience
      that ICANN is basing its decision on. Afilias has delivered this level
      of performance based in part on its stable, reliable database, PostgreSQL.

      The successful operation of a registry extends beyond simply which
      database software is in use. It also requires a skilled operating staff
      with the ability to design and implement reliable systems as well as
      establish clearly defined resolution paths should problems occur.
      Afilias' solid operating performance lends support to the claims in our
      .ORG proposal regarding our ability to effectively manage the .ORG domain.

      We do not take issue with the recitation of the many features and
      benefits of Oracle's products. However, any suggestion that PostgreSQL
      is unsuited for registry use is in direct contradiction to the facts.
    3. Re:Can it Compete with Oracle or DB2? by Stone316 · · Score: 5, Informative

      In my 8 years as an Oracle DBA I don't think i've ever seen a corrupt index. Saying that, I don't even know how you could force a index to get corrupted so I don't think were seeing all the info here.

      There is alot of hype in the database market as is there with any other area such as OS preference. A good DBA, like a good software developer will pick the database that fits the needs. Saying that, usually DBA's (like anyone else) are under certain constraints from management but heres my take:

      For:

      Mission Critical Apps and large DB's: Oracle or DB2
      Mid-Range apps/Mid-sized DB's: The above + SqlServer, PostgreSQL.
      Small: SqlServer, PostgreSQL. (+ Oracle and DB2 if you like to toss around the $$).

      I'd feel comfortable using PostgreSQL for upto and including mid-sized DB's. Currently I wouldn't use mySQL for anything until they fix their Gotcha's.

      If you really and I mean really have faith in your developers and they have reviewed these gotcha's i'd consider MySQL but unfortunately, as every DBA knows this isn't always possible. It only takes one bad apple to mess everything up.

      Of course there are many other factors to choosing a database but the core comes down to your employees and licensing. If all your DBA's have extensive training on Oracle then it doesn't make much sense to retrain them to use another DB just because it maybe a better fit. Also, if you have a server license for Oracle it doesn't make much sense to buy another so you can use DB2.

      At our shop we have a mix of Oracle and SqlServer. But we do installs for DB2, Redbrick, informix, everything and anything under the sun.

      Anyways, thats my 2 bits.

      --
      "Thanks to the remote control I have the attention span of a gerbil."
    4. Re:Can it Compete with Oracle or DB2? by Stone316 · · Score: 4, Insightful
      There's more to a database than feature set. While postgreSQL has enough features for 98% of the applications out there it isn't that simple.

      In 8 years i've never lost data from an Oracle database from a software problem. I've seen data get lost, corrupted for a number of reasons including incompetent DBA's and their managers. (Off topic but once I was called into a major telephone company because they had some corrupted blocks from a hardware issue. I asked them how long did they keep their backups, 3 months they replied. Ok, how long have you known about this problem, 5 months. Hrmm... 3 - 5 = -2. You can fill in the rest of the story..)

      I haven't used postgreSQL in a production environment long enough to know how stable it is. The reason companies choose commercial vendors for their DB's are two fold:

      1) Track record. They know if they pick Oracle or DB2 they are getting a solid,proven database system. And there is an abundance (if not expensive) of knowledge out there. Their support is bar none and for the most part I have been extremely satisfied.

      2) Managemnt loves to save money. Who wouldn't want to be able to say they saved the company millions of dollars by going to a 'free' or inexpensive (if you pay for support) rdbms like postgresql or mysql. One reason, blame. Opensource still has the stigma attached to it that no one is accountable for bugs. If a critical revenue generating db goes down because of a bug a manager needs to be able to point their finger. Until this stigma goes away we won't see alot of opensource adoption in the DB market. Whether this is right or wrong doesn't matter, people don't like change and opensource is a huge change for alot of managers.

      --
      "Thanks to the remote control I have the attention span of a gerbil."
    5. Re:Can it Compete with Oracle or DB2? by JamesKPolk · · Score: 2, Insightful

      If they use an RDBMS they have the code to, yes, they have the option of bringing an RDBMS on staff and doing custom improvements and fixes. However, they also have the option to go hire some other company to make the fixes and improvements they need.

      The user of PostgreSQL has a whole market of developers to choose from. The user of Oracle has only one choice, and that company is known for taking a monopolist*'s rents from its customers.

    6. Re:Can it Compete with Oracle or DB2? by Tailhook · · Score: 2, Interesting

      In my 8 years as an Oracle DBA I don't think i've ever seen a corrupt index. Saying that, I don't even know how you could force a index to get corrupted so I don't think were seeing all the info here.

      I have. As the original poster said, there is usually a DBA involved.

      You want to see Oracle corrupt something? Easy. Just install a half dozen oracle homes, from 8.0.6 through 9i, use any random version of sqlplus, sqldba that happens to be in the path to do things like create new tablespaces on whatever instance you happen to need to work on. Screw around with every init parameter there is, including undocumented parameters you read about on forums. Bounce the database a lot, and if it balks just kill the processes. Oh yeah, distributed transactions are fun too; wire up some materialized views over a international VPN connection and ignore hung transactions for a long time. Be sure to bounce the instance (using the aforementioned KILL -9) when Oracle tries to apply the transactions.

      I guarantee you will witness a corrupt index in short order. If you're lucky that's all you'll see. It's a credit to Oracle that their product can withstand such ineptitude and still function.

      Like you, I've never been a party to corrupting something in an Oracle instance. I have seen it, however, and I know the fools involved. That they only managed to corrupt a couple blocks and not eradicate entire tablespaces is only good fortune. Either way, 99% of "corrupt" whatever is DBA induced; Oracle is by non-amateurs, for non-amateurs and does not corrupt things willy nilly.

      --
      Maw! Fire up the karma burner!
    7. Re:Can it Compete with Oracle or DB2? by platypus · · Score: 2, Interesting

      And you know what? If people would license Oracle only for Mission Critical Apps and large DBs, Oracle would be bankrupt tomorrow.
      At least if I extrapolate what I'm seeing in the enterprise, Oracle's total revenue would go down 80%. That's why they were already FUDing around in 2002 when the decision about the .org domains was made (hardly something which would justify paying $$$ to Oracle).

    8. Re:Can it Compete with Oracle or DB2? by Anonymous Coward · · Score: 3, Interesting

      This is the fakest answer in all of IT.

      We had problems with MS IIS servers at a big financial services company - did they help us? No
      Did we have the premium "MS fucked us so hard, we got a plaque for it" service/support contract? Yes.
      Did we sue them? No fucking way.

      Has any major software company ever been sued over the bugs or failures or problems caused by their software?

      If it has happened, it is nowhere near the rate of problems that their software has caused.

      I'd like to slap the shit out of the next idiot IT manager I hear say this kind of crap - we can't use that, we need to have someone we can sue...

      Yeah, right except what really happens is that after their crappy software doesn't function the way it was promised, I get to work a holiday weekend to fix it while you golf with the assholes who sold it to us.
      Same goes for EDS, Accent>ure, KPMG and the rest of those money holes. Gore (as in Gore-tex) was the only one who had the guts to say what every corporate IT slave knows - the emperors of the corporate systems world have no clothes

  8. Let the flames begin by Gothmolly · · Score: 3, Funny

    (MySQL|MSSQL|Oracle|DB2) is (cheaper|better|faster|ACID-compliant|'1337) and Postgres is (slower|buggier|missing features|has broken features|sucky)!!!

    --
    I want to delete my account but Slashdot doesn't allow it.
  9. Native Win support - awesome by Stone316 · · Score: 5, Interesting

    I think this was a major stumbling block for postgreSQL's adoption. I'd love to use it here at work for some small projects but unfortunately were getting more and more windows servers. PITR recovery is a must for any production database these days. Maybe there are some 3rd party packages but I don't think mysql supports this yet. This is great news and I hope it spurs a new round of adoption for pgsql!

    --
    "Thanks to the remote control I have the attention span of a gerbil."
    1. Re:Native Win support - awesome by Stone316 · · Score: 2, Funny

      Yeah, your correct but unfortunately most saw that as a hack and you had to have half a clue to get it working. ie, its alot harder than double clicking on setup. :)

      --
      "Thanks to the remote control I have the attention span of a gerbil."
  10. Re:You can save a few clicks...and read it here. by dave+at+hostwerks · · Score: 3, Informative

    Apologies to Ziff-Davis...

    From: "Marc G. Fournier"
    To: pgsql-announce ( at ) postgresql ( dot ) org
    Subject: PostgreSQL 8.0.0 Officially Goes Beta
    Date: Mon, 9 Aug 2004 21:36:52 -0300 (ADT)

    After almost 9 months of development, the PostgreSQL Global Development Group is proud to announce that development on PostgreSQL 8.0.0 has now finished, and is ready for some serious testing.

    For those wondering about the 8.0.0 designation on this release, there have been several *very* large features included in this release that we felt warranted the jump. As with all of our releases, we aim to have this one as rock solid as possible, but *at least* one of the features added to this release involved such changes that may warrant a bit extra testing post-release before deploying it in production.

    Although the list of new features in 8.0.0 is extensive, with both SMB (Win32 Native Support) and Enterprise (Nested Transactions and Point in Time Recory) features being added, there is one thing that hasn't been included as part of the core distribution, and that is a Windows Installer, which can be found at:
    http://pgfoundry.org/projects/pginstaller

    For a complete list of changes/improvements since 7.4.0 was released, please see:
    http://developer.postgresql.org/beta-history.txt

    That said, and without further ado, Beta 1 is currently available for download on all mirrors:
    http://www.postgresql.org/mirrors-ftp.html

    And, thanks to David Fetter, the Beta is also available via BitTorrent at:
    http://bt.postgresql.org

    As with all releases, the success of this release falls in the your hands ... to go from Beta -> Release, we need as many people out there to put it through her paces as possible, on as many platforms as possible. We urge anyone, and everyone, to download a copy and run her through her regression tests, and report any/all problems, and bugs, to
    pgsql-bugs ( at ) postgresql ( dot ) org

    The more bugs we can find, and eliminate, during Beta, the more successful the Release will be...

    On behalf of all of the developers, Happy Bug Hunting ...

    --
    d a v e
    "Hmmm...upgrades."
  11. Windows support by Anonymous Coward · · Score: 5, Interesting

    I think Windows support is the only reason MySQL is so popular. PostgreSQL has always been ahead of MySQL in terms of everything but speed. But everybody is familiar with MySQL because, when you want to pick something up, you pick the one that will work with your system, and most people are on Windows.

    Up until this point, you have had to install hundreds of MB of cygwin to get PostgreSQL to work on Windows. I think it's a little late to usurp MySQL's market share, especially as MySQL is now entrenched in the cheap web hosting market, but at least PostgreSQL might get the respect it deserves.

    1. Re:Windows support by Khomar · · Score: 4, Insightful
      I think Windows support is the only reason MySQL is so popular...ahead of MySQL in terms of everything but speed. (emphasis added)

      You cannot overlook the speed aspect as well. For many, many databases, the special features of foreign keys, stored procedures, etc. are not required. I have worked extensively with Oracle databases in the past, so I am well aware of the advantanges of these advanced features. However, in my current company, there has been no need. Most of our databases, while large, consist of a very small number of tables. The vast majority of our searches are performed on a single table, and these searches are completely optimized for speed. Stored procedures will not help in these scenarios, and foreign keys are not needed. I imagine there are a lot of web sites and applications that have the same characteristics.

      I will not deny that the Windows support is huge, but it is not the only factor in MySQL's court. Speed is a huge issue, especially in the database world.

      --

      I believe in de-evolution. God made the world perfect, man fell, and its been going downhill ever since!

    2. Re:Windows support by dpb · · Score: 2, Informative

      From my POV the MySQL -> PostgreSQL migration isn't so important as the Oracle -> PostgreSQL migration. Having been a part of the migration team porting the Red Hat CMS from Oracle to PostgreSQL I can say that even when we started with PG 7.2 it was more than capable as an oracle replacement. With improved optimizer performance in 7.3 and now even better Pl/SQL compatability, native Win32, savepoints, PITR and replication available, there is even less reason to use Oracle. I think PG will be able to take a large chunk out of Oracle in the Low & Mid-range markets.

    3. Re:Windows support by GooberToo · · Score: 2, Insightful

      PostgreSQL has always been ahead of MySQL in terms of everything but speed.

      That blanket statement is simply not true. Most people think that a single user with a single query is a measure of speed. For most applications, it is not. And bluntly, this is exactly where MySQL's performance advantage starts and stops. MySQL simply does not scale nearly as well as just about any other RDBMS you'll find, including PostgreSQL.

      Granted, there are still some corner cases where I'm sure MySQL is faster, especially when you're not using ACID compliant tables, but make no bones about it, PostgreSQL is much faster than most people realize and MySQL is much, much slower than is commonly believed.

    4. Re:Windows support by aralin · · Score: 2, Insightful
      I will not deny that the Windows support is huge, but it is not the only factor in MySQL's court. Speed is a huge issue, especially in the database world.

      I can agree with you, if you want to get a lousy job done fast, then MySQL is exactly that type of DBMS you pick. I mean, if you have few, mostly not conflicting, updates and mostly just need fast query, you will be fine.

      On the other hand, if you want a full scale, acid compliant, transaction oriented DBMS, and your priority is many updates and fewer queries, and you have accent on quality of your data, you will pick PostgresSQL.

      Many websites fall into the first category. But for example large scale email system would be much better off with postgress. Also, you can have a read-only query database on MySQL and read/write database on PostgresSQL if you want to get the best of both worlds.

      --
      If programs would be read like poetry, most programmers would be Vogons.
    5. Re:Windows support by sqlgeek · · Score: 3, Informative

      I regret to inform you that MySQL is actually not faster than Oracle.

      MySQL cannot partition data and then either: 1. eliminate partitions and only perform i/o on the relevant one(s), 2. process against all partitions in parallel.

      MySQL cannot maintain aggregated images of your data an re-write ad-hoc queries to use the aggregates.

      MySQL cannot store metadata that will tell it that postal code implies county, and hence a query that wants data aggregated to the county can use the image of data at postal code granularity. (It is not true that postal code implies county, but you get my point).

      MySQL cannot perform an efficient hash-join to save its life (even though a properly designed hash join is mathematically superior in a great many cases) -- and so it falls back on sort-merge regularly.

      MySQL cannot re-write NOT IN or NOT EXISTS clauses as merge anti-joins. Neither can it re-write IN or EXISTS clauses as merge outer-joins.

      I have to get back to work now, but surely you get the idea.

      Cheers,
      Scott

    6. Re:Windows support by johnnyb · · Score: 2, Insightful

      If your main concern is speed you should not be using a relational database. If your main concern is data integrity, you should not be using MySQL.

  12. full text search by jbellis · · Score: 4, Informative

    I guessed you missed OpenFTS, which has been out for a couple years now.

  13. Re:*cough* bullshit *cough* by MarsDefenseMinister · · Score: 2, Funny

    Doesn't even know about dBase III. That thing stopped development not 10 years ago, but 20 years ago. Maybe the guy was working so hard on dBase III that for the last 10 years of the project he didn't notice for a decade that all his fellow programmers weren't coming to work, his paychecks weren't arriving, Ashton-Tate was no longer in business, and a new company had moved into the office space that he was working in.

    --
    No weapon in the arsenals of the world is so formidable as the will and moral courage of free men.-Ronald Reagan
  14. what about distributed transactions? by RelliK · · Score: 2, Interesting

    As far as I'm concerned, the only truly missing feature is distributed transactions. Are there any plans to add them any time soon?

    --
    ___
    If you think big enough, you'll never have to do it.
    1. Re:what about distributed transactions? by rtaylor · · Score: 2, Informative

      There have been attempts at adding 2 phase commit which would work with Java applications -- these were deemed incomplete, unsafe or needing work.

      It is likely work will continue on this feature, though don't expect a replication system to be based on this as there are a number of problems within the spec itself (failure modes that leave the system essentially out of order).

      See the pgsql-hackers archives (Google Groups) for details.

      --
      Rod Taylor
    2. Re:what about distributed transactions? by GooberToo · · Score: 3, Informative

      As far as I'm concerned, the only truly missing feature is distributed transactions. Are there any plans to add them any time soon?

      Yes. IIRC, in the last release, the protocol has been expanded to allow for this concept. Nested transactions were also required. These are now in place. I'd guess that two phase commits and distributed transactions (sometime after 2pc) will follow sometime after the 8.0 series stablizes.

      In other words, it's on their radar but I don't know what priority they are placing on it.

    3. Re:what about distributed transactions? by davegaramond · · Score: 2, Interesting

      The way I understand it, someone has been maintaining a 2PC patch (perhaps even since the 7.3.x days?) However, there seems to be little interest in the patch. It didn't get reviewed for long. And finally, when it's about to be integrated in the later phase of going to 8.0, the nested transaction patch got in. This conflicts heavily with 2PC. The 2PC patch maintainer didn't have time to adjust the patch, and so 2PC didn't make it to 8.0. Instead, nested transaction does.

      2PC will probably be integrated in 8.1?

      So if you really need 2PC, join the pgsql-hackers mailing list and test/comment on the 2PC patch. More requested features will get in first. That's the way it works.

  15. Some nice performance enhancements by grunt107 · · Score: 4, Interesting

    The cross-datatype comparison indexing is very important (ex. '1' = 1), as well as index usage on OR clauses. Both of these before would cause full table scans, which is very costly on VLDBs (Very Large DataBases).
    The improvement to the VACUUM I/O processor is important for Postgre to be used on a multi-app server. The 'play nice' feature will allow one server to house the DB AND web servers (albeit at a performance hit to the DB processes).
    Overall, a nice improvement.

  16. Thank you Fujitsu And Afilias. by ron_ivi · · Score: 4, Interesting

    I just wanted to say thanks to Fujitsu for helping pay for this

    Fujitsu foots the bill for new PostgreSQL database features
    Thursday July 01, 2004 (07:04 AM GMT)
    ...
    Berkus described the new Fujitsu-formed features as follows:

    * Tablespaces is a means of partitioning large amounts of data easily and efficiently on separate storage devices, a key requirement for maintaining PostgreSQL's performance on large databases in the hundreds of gigabytes, and terabyte range;
    * Nested Transactions allows application developers a very granular level of control over database commits and rollbacks, which is particularly significant for maintaining data integrity and porting applications from other database platforms;
    * Robust support for stored procedures in Java that exceeds the goals of the SQLJ specification in the ANSI SQL99 standard.
    And thanks to Afilias (the guys who run the .org domain) - from the same article:
    More recently, .org and .info domain registry company Afilias has sponsored developer Jan Wieck to work full time on developing a new, enterprise-class replication system for PostgreSQL called Slony-I, to be presented next month at OSCON in Portland, Ore.
    1. Re:Thank you Fujitsu And Afilias. by killjoe · · Score: 2, Interesting

      DOes anybody know if the new replication will support merge and multi-master replications. Even ring replication a-la mysql would be better then one way master-slave replication.

      --
      evil is as evil does
    2. Re:Thank you Fujitsu And Afilias. by ttfkam · · Score: 2, Interesting

      No more than Perl and Tcl are prerequisites. As with all programming language support in PostgreSQL, you compile what you want in and exclude what you don't want.

      Calm down. Breathe.

      --

      - I don't need to go outside, my CRT tan'll do me just fine.
    3. Re:Thank you Fujitsu And Afilias. by Sunspire · · Score: 2, Insightful
      ...a new, enterprise-class replication system for PostgreSQL called Slony-I
      PostgreSQL is good from a technical point of view, but they could use someone with some very basic PR and marketing skills on their team. A new website and better documentation wouldn't hurt either.
      --
      It's like deja vu all over again.
    4. Re:Thank you Fujitsu And Afilias. by Earlybird · · Score: 3, Interesting
      • More recently, .org and .info domain registry company Afilias has sponsored developer Jan Wieck to work full time on developing a new, enterprise-class replication system for PostgreSQL called Slony-I, to be presented next month at OSCON in Portland, Ore.
      Except Slony-I is a single-master/multiple-slave replication system -- hardly "enterprise-class".

      What's slightly noteworthy about Slony is that it has "switchover" support. If the master fails, one of the slaves become the master.

      Of course, since Slony's replication is asynchronous, it means that at the point of switchover, slaves might not have received all pending changes, thus becoming out of sync with the master. Unfortunately, Slony doesn't really address this problem.

      The design overview is useful reading, if rather confusing; the writer's first language is probably not English.

    5. Re:Thank you Fujitsu And Afilias. by boneshintai · · Score: 3, Interesting

      Strongly disagree.

      The PostgreSQL website is easy to navigate and easy on the eyes. Links to anything most users will need -- downloads, docs, and search -- are right at the top of every page.

      The MySQL website uses microfonts, and good luck finding documentation without resorting to google site:mysql.com; there's links to it on some pages and not others, and most notably not on the front page. The MySQL website is, apparently, trying to be oracle.com, only worse.

      The difference is pretty simple: The postgresql developers are trying to write a database server. Selling it is not their concern, nor is marketing it to the world: they let others (mostly, their users) do that while they focus on development. MySQL, on the other hand, is a business: they need customers to survive, and sometimes the technology takes a back seat to the business side of things.

    6. Re:Thank you Fujitsu And Afilias. by jocmaff · · Score: 2, Informative

      While I do agree the MySQL.com site could have better navigaion, it is still cake to find anything you want if you know the name...
      example: just type into your browser "mysql.com/interval" and you are instantly transported to the proper documentation discussing SELECTING and using INTERVAL. Another great feature that I believe was implemented from the guys at PHP.net (learned this at the MySQL conference last year)

  17. Re:Two things by MattRog · · Score: 2, Informative

    "what does a wheel-barrow... have... to do with DBs??"

    Nothing. It's even an incorrect category. A database is the data you collect. PostgreSQL is a DataBase Management System (DBMS). They should rename the category to reflect this.

    --

    Thanks,
    --
    Matt
  18. MySQL faster than postgresql? by jbellis · · Score: 3, Informative
    Maybe if you only have one client querying the DB, and you're not using any features newer than SQL-89. Maybe.

    Back in the 6.x days postgresql had a well-deserved reputation for being, well, slow. That was back in the '90s, though.

  19. Re:What the versions mean by SSpade · · Score: 4, Informative

    In the case of postgres there are three digits in the version - a.b.c

    If your upgrade increases either a or b then the on-disk structure of the database has changed, and as part of the upgrade you'll need to dump the database out to a backup file and restore it.

    If the only change is in the final digit c then there's no on-disk change and you can upgrade just by upgrading the binaries. That tends to mean that final digit upgrades are bug fixes, and you should always do the upgrade.

    So if you're running 7.4.1 you can easily, and definitely should, upgrade to 7.4.3. But upgrading to 8.0 is a marginally more time-consuming upgrade that you may not want to make on a production system unless you want the new features in 8.0

    There's no 'technical' difference between a first digit change upgrade and a second digit upgrade. There's a difference in expectations though, and the version following 7.4.* has enough major new features to justify a major version jump to 8.0.0, with all the positives and negatives that jump implies. The upgrade path would have been identical had it been called 7.5.0 though.

  20. replication is not a failover solution by RelliK · · Score: 5, Interesting

    PostgreSQL supports replication BUT replication is absolutely useless as a failover mechanism because it is asynchronous. That is, when you commit a transaction, you cannnot be sure if/when it gets propagated to the slaves. For true failover you need distributed transactions. Neither MySQL nor PostgreSQL support them, but curiously, Firebird does.

    --
    ___
    If you think big enough, you'll never have to do it.
    1. Re:replication is not a failover solution by wieck · · Score: 5, Informative

      Looking with a narrow view at situations that need 100% guaranteed zero transaction loss on failover, you are right. Many businesses however can live with a little (few seconds) lag and the risk of losing the last couple of transactions, given that there is a mechanism to later analyze the failed server (after recovery) and find out what had been lost, to solve these cases manually or inform users/customers.

      The true failover functionality you are talking about will be the goal of my follow-up project Slony-II, which will implement synchronous multi master replication for PostgreSQL. The design phase will start in about 3-5 months.

      Sincely, Jan

      --
      It takes a real man to ride a scooter ... what are you compensating for?
    2. Re:replication is not a failover solution by killjoe · · Score: 2, Informative

      You may want to look at backplane.

      --
      evil is as evil does
  21. Re:Newbie Question - UI Tool by donutz · · Score: 2, Informative

    Probably not of interest to you, but certainly worth mentioning is phpPgAdmin, a web based PostgreSQL administration tool. Works well for me.

  22. Sure! Here's how to get it: by NerveGas · · Score: 3, Informative

    ./configure;make

    It's supported 64-bit for as long as I can remember.

    steve

    --
    Oh, you're not stuck, you're just unable to let go of the onion rings.
  23. Re:Newbie Question - UI Tool by rycamor · · Score: 4, Informative
  24. Re:DROP COLUMN, ALTER COLUMN TYPE and SQL-99 Specs by rtaylor · · Score: 5, Informative

    You'll like this, actually...

    If it can be cast directly (integer to numeric) it will do so implicitly.

    So, integer to smallint will do part of the work -- but if it fails (comes across a number that won't fit in the smallint) then it will rollback -- nothing lost but a little time (most PostgreSQL commands are atomic and transactional).

    However, you can use an expression to do the conversion if you have something stranger in mind -- it's essentially run as an UPDATE.

    Excuse the crappy formatting.

    BEGIN;

    SAVEPOINT altertab;

    ALTER TABLE tab
    ALTER COLUMN text_col TYPE bool
    EXPRESSION (CASE WHEN text_col = 'SOMETHING'
    THEN TRUE
    ELSE THEN FALSE
    END);

    ROLLBACK TO altertab;

    ALTER TABLE tab
    ALTER COLUMN text_col TYPE bool
    EXPRESSION (CASE WHEN text_col IN ('SOMETHING', 'OR', 'ANOTHER')
    THEN TRUE
    ELSE THEN FALSE
    END);

    COMMIT;

    --
    Rod Taylor
  25. Re:not yet on par with MySQL by Guillermito · · Score: 2, Insightful
    Appearantly their SQL parser is still very flawed and you cannot seriously store binary data with it (BLOBs), unless you can live by the ugly encoding you get your data back with. MySQL never had such problems (it also allows binary data in TEXT fields!),

    Maybe it is because MySQL treats TEXT fields as binary since it has no Unicode support (at least, the current stable, non beta release).

    But then again... a man's bug is another man's feature.

  26. Re:Other databases... by icebattle · · Score: 2, Informative

    you might be thinking of ingres... recently open-sourced by ca.

  27. P.I.T.R by blooba · · Score: 3, Interesting
    Point-In-Time Recovery is extremely important, and was the one major factor that prevented me from seriously considering PostgreSQL in a production environment. However, please bear in mind that such a feature requires extensive testing, i.e., crashing your db in every conceivable way, and then recovering it quickly AND consistently (in consistent mode.) So I will still wait and see about this feature.

    Tablespaces are also a key feature. The nicest thing about tablespaces is: each schema can have its own tablespace. This makes maintenance much, much easier, allowing you to isolate the data for each of multiple applications or developers. You can also use it to isolate mission-critical data within the same schema, which in many cases can keep your app running, even if you lose a non-critical portion of your database.

    Savepoints are nice, but I've never had to use them. And altering column data types is nifty, but not really useful in the real world.

    Btw, does PostgreSQL have row-level locking yet?

    1. Re:P.I.T.R by GooberToo · · Score: 5, Informative

      Btw, does PostgreSQL have row-level locking yet?

      Static docs provide your answers.

      Remember, one of the points of using MVCC is to avoid row locking whenever possible. But, I think you'll be hard pressed to come up with a situation where your desired locking facilities are not provided for with PostgreSQL.

      To quote the online documentation:
      "In addition to table-level locks, there are row-level locks. A row-level lock on a specific row is automatically acquired when the row is updated (or deleted or marked for update). The lock is held until the transaction commits or rolls back. Row-level locks do not affect data querying; they block writers to the same row only."

  28. Really cool stuff in PostgreSQL by cmowire · · Score: 4, Informative
    • user defined types, including the ability to create customized indicies for them. So there's a type specifically to handle encrypted authentication passwords, for example, so you don't need to mess with crypt() all of the time.
    • Inheritance for tables, so you can agregate different types of data without needing to explicitly set all kinds of primary keys.
    • Full ACID support, like a real database
    • MVCC instead of row or table locking.
    • BSD license
    1. Re:Really cool stuff in PostgreSQL by Sxooter · · Score: 2, Informative

      Inheritance for tables, so you can agregate different types of data without needing to explicitly set all kinds of primary keys.

      Unfortunately, the inheritance doesn't currently handle things like pks and unique indexes across the inherited tables. sigh.

      --

      --- It is not the things we do which we regret the most, but the things which we don't do.
  29. More adoption of SQL92 than of MySQL's QL by brlewis · · Score: 2, Insightful

    PostgreSQL adheres to the standards more than MySQL, so you're using a language with broader industry adoption if you use PostgreSQL. Especially from someone who says, "If X then we'll use Oracle", you ought to know that PostgreSQL would make migration to/from Oracle easier.

  30. Re:not yet on par with MySQL by Guillermito · · Score: 2, Interesting
    But what counts at the end of the day is, that MySQL is far more user-friendly and people would have a hard time to migrate to Postgres

    It depends on which user you are talking about.

    A database system has many users. Among them, database administrators and programmers. Programmers' goal is to hack applications as easily and quickly as possible. Database administrators' goal is to make sure the database keeps its integrity (i.e. the data stored there is correct)

    I would say that PostgreSQL is more friendly towards database administrators and Mysql is more friendly towards programmers. And, no, you can't have a DBMS which makes both happy: there are opposing roles.

    IMO what counts at the end of the day (I mean, from a business point of view) is that the organization as a whole can trust its data, and not if a hacker wrote 50 or 100 fewer lines of code.

    Of course, if you are talking about a situation in wich the same person is the database administrator *and* the only programmer, well... I think MySQL is OK for your league.

  31. Re:Database Questions by ciroknight · · Score: 4, Insightful

    To the second question: Nobody in the open source world.

    Microsoft's on the way to doing it, and there was a small project that existed for a few months that allowed GNOME to access a database as a file system (It was very nasty; involved a kernel patch (a CORBA orb) that nobody was too happy about, so the project never took off.)

    I've thought about the problem a few times. It requires the kernel pass information back to user space, unless the database was actually incorporated into kernel space (and that won't blow over well for a number of reasons). Passing the data back to user space requires a messaging system. The problem is, there are very few messaging systems out there designed specifically for kernelspace-userspace communication. CORBA was one developers answer; my answer would to be to ground up a protocol (because I feel that a network messaging solution, i.e. TCP/IP, can't be secured well enough in the long run).

    Lastly, a daemon needs to exist to listen to the calls from the kernel and interpret them into SQL. This could be built into the kernel itself, but once again you have to question the security of the kernel building an SQL query that would go directly to the database server. Also, one of the better parts about this daemon would be metadata extraction; since the daemon is virtually transparent to both the user and the database server, the metadata can be completely ripped from the data and stored in a seperate table to allow for much faster, more optimised searches. EXIF Tags can be copied from JPEGs, ID3 tags copied from MP3s, etc.

    Ideally, the daemon would be pluggable, allowing for anyone's metadata extension to be added after compiliation, but I believe that it's important to have a functional system before having a featureful system.

    If you'd like to talk more about it, I'm really open to the idea of finally having an SQL-based file system. A relational database file system is the future; if we get there before Windows, we can add yet another example of the speed of open source development.

    --
    "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
  32. MySQL only fast for single user? by wieck · · Score: 5, Informative

    You really need to update your "known facts".

    Using a TPC-W style benchmark suite implemented with Apache, PHP4 and either MySQL 4.1.1 or PostgreSQL 7.4.2, I get more or less the same performance. Because of the transactional requirements and the update concurrency, all tables are InnoDB, of course. Based on that I cannot but contradict your claims about MySQL's scalability (and I am a PostgreSQL CORE developer). It keeps well up and is stable even under heavy load. Where the test uses a stored procedure in PostgreSQL, it must use a bunch of PHP code and separate query calls in the MySQL case, but that is exactly what developers do today and since the Apache server is part of the benchmarked system, this is as fair as possible.

    That said, Apache+PHP+DB is the environment most people are talking about when they speak about simple to medium complex Web applications. With the scalability and performance being head to head, why would someone voluntarily miss stored procedures, views, triggers and all the other yet to be done for MySQL features? And while the (new in 4.1) subselect support makes it possible to get all of the TPC-W functionality implemented at all, to get it running fast enough in MySQL one has to rewrite some queries in a manner that I would call unmaintainable code. These complex features are not something where you can say "Transactions, checkmark". You have to look at how complete the implementation is and how well the query optimizer can deal with queries that use that feature.

    So looking at the two right now, with the performance advantage gone, and the Win32 support knocking at the door, replication available and tons of well settled features in the HISTORY that are still on MySQL's ROADMAP, PostgreSQL is not just the better choice in some cases. It is ahead ... except for MySQL's outstanding marketing.

    Sincerely, Jan

    --
    It takes a real man to ride a scooter ... what are you compensating for?
  33. Re:not yet on par with MySQL by Bromrrrrr · · Score: 4, Interesting

    ..Mysql is more friendly towards programmers.

    Are you kidding me? If you like to do everything in your app that _should_ have been handled by the DBMS then yeah, sure :)....MySQL is more friendly to the programmer who hasn't got a clue about databases maybe, if you know what a real DBMS can do it becomes a pain in the ass to work with.

    you can't have a DBMS which makes both happy: there are opposing roles.

    Well, I don't think I'd agree with that, but if anything I'd say MySQL is the easier one to administer. Postgres needs a lot more thought with regards to tuning and user management.

    Especially user management in Postgres is, in my view, horrible and a lot better in MySQL. Well, can't have it all I guess :) I'd still take Postges over MySQL any day.

    --

    What a rotten party, have we run out of beer or something?
  34. Does the on-disk format still change at every rel? by perbu · · Score: 2, Insightful
    This makes maintaing a _large_ Postgres-installation a real pain. Dumping a 200GB database to SQL and piping the SQL back into Postgres can take days. How hard can it be to decide on one format and to stick to this?

    Mysql is still able to read and write ancient databases (the ISAM format was defined in 1986 and can still be read).

  35. But does it have finer grained locking by Dukhat · · Score: 2, Interesting

    The biggest problem that I face with Postgres 7.4 is that its referential integrity's locks block INSERTS and UPDATES that should go through fine.

    For example, set up these two tables:
    CREATE TABLE car_type (
    id serial primary key,
    name varchar(20)
    );

    CREATE TABLE car (
    id serial primary key,
    car_type_id integer references car_type
    );

    Now, try having two different connections insert with the same foreign key value (this field does not have a unique constraint):

    Connection1:
    BEGIN; INSERT INTO car (car_type_id) values(1);

    Connection2:
    BEGIN; INSERT INTO car (car_type_id) values(1);

    You will see that the second transaction is waiting for the first transaction to commit. That is just rediculous and is one reason that Postgres is still small time.

    1. Re:But does it have finer grained locking by GooberToo · · Score: 3, Informative

      Well, sequences exist outside the transaction, so I can't say that it should effect it in the least.

      I'm running 7.4.2 here and I get this:
      Session 1:
      test=# insert into car_type values ( 1 ) ;
      INSERT 33665 1
      test=# BEGIN; INSERT INTO car (car_type_id) values(1);
      BEGIN
      INSERT 33666 1

      Session 2:
      test=# begin; insert into car( car_type_id) values ( 1 ) ;
      ERROR: current transaction is aborted, commands ignored until end of transaction block
      ERROR: current transaction is aborted, commands ignored until end of transaction block

      Sounds like he's fudding, using a different isolation level, or using an old version of PostgreSQL.

      Prehaps he can restate exactly what his problem is and exactly what his test case is. As he presented it, it would simply fail because of a forign key constraint. As you can see, I inserted a row to allow it...but, it sounds like he's confused or only telling part of the story.

    2. Re:But does it have finer grained locking by [Rob] · · Score: 2, Informative
      I've spent 4 moderation points on this thread but now thats all gone to waste. I want to reply to this.

      I beleive you have made a mistake. The error you are recieving is due to a failed statement in your transaction. I have tested his example in 7.4.3 and found it to be correct. I even removed the sequences from the example and the block still happened. I don't know why the block is occuring. Maybe because the reference checks in both transactions are trying to read the same row? That doesn't right so I don't know.

      As a previous post said, changing the isolation level will probably fix the problem. Here is the documentation.

  36. funny by jbellis · · Score: 2, Funny

    My experience has been that saying MySQL can't handle load is like saying it gets hot in Texas in the summer. :)

  37. Re:Does the on-disk format still change at every r by Christopher+B.+Brown · · Score: 3, Informative
    They change the format because it it is necessary in order to implement the new features that they are adding in.

    One of the points of Slony-I is to provide an answer to this very problem. Slony-I supports versions 7.3, 7.4, and 8.0, and may be used to support a short-outage upgrade path.

    Suppose you have a 7.3 database, and want an 8.0 one. You set up replication between the 7.3 database and the new 8.0 one. It may take a couple of days for the new one to get up to date, but you don't have to shut the 7.3 one down.

    Once the databases are more or less in sync, you do a MOVE SET to change the "master" to be the 8.0 database. Since they are nearly in sync, this should only take a few seconds. Presto! The 8.0 database is the "master," and you can switch over to it with whatever brief outage is needed to get your application to point to a new server.

    --
    If you're not part of the solution, you're part of the precipitate.
  38. Re:Does the on-disk format still change at every r by Sxooter · · Score: 2, Insightful

    Actually, it's not the format of the data store so much as changes to the system catalog, which are put in place during initdb.

    There has been a project for upgrading in place, but it just hasn't had enough man power thrown at it to be a viable solution.

    Maybe it's time for you to volunteer?

    --

    --- It is not the things we do which we regret the most, but the things which we don't do.
  39. Windows Native Support by adolfojp · · Score: 5, Interesting

    I believe that native windows support for PostgreSQL is essential, not necesarily to deploy apps in that enviroment but to test and develop them. When I started using MySQL on my windows box, I had also looked into PostgreSQL. The lack of windows binaries for PostgreSQL made MySQL the default choice for me. On features alone PostgreSQL wins hand down. Also, in my experience, the faster performance of MySQL over PostgreSQL dissapears when I use InnoDB tables for transactional data processing. The doors to PostgreSQL have been open to many developers stuck in the windows world. Perhaps I will try PostgreSQL for my ASP.NET apps in addition to my trusty MySQL.

    Cheers
    Adolfo

  40. Re:Go postgreSql, go! by bestguruever · · Score: 2, Funny

    If you're going to use it expensively, then why not just go with Oracle?

    --
    if you think this is bad, you should have seen my last sig
  41. Re:[grumble, grumble, grumble] by davegaramond · · Score: 2, Interesting

    There's ltree in contrib/. It's pretty much the same thing, but with different syntax.

  42. Not fair! by davegaramond · · Score: 2, Insightful

    Dude, with "kill -9" it will not be long until you corrupt PostgreSQL, MySQL, etc. too.

  43. Re:What the versions mean by jadavis · · Score: 2, Informative

    There's no 'technical' difference between a first digit change upgrade and a second digit upgrade.

    As I understood from reading the lists, there is a technical distinction. a.(b+1).c is supposed to be more stable than a.b.d, even though it may have some additional features.

    8.0 added so many powerful features that the developers did not want to imply that it would be more stable than 7.4. 7.4 is pretty much rock-solid, and 8.0 might not achieve that reputation until 8.1 or so.

    --
    Social scientists are inspired by theories; scientists are humbled by facts.
  44. Re:Newbie Question - UI Tool by Alex+Blume · · Score: 2, Informative

    You could also check out my database tool DBInspect. No SQL syntax coloring (yet), but it's free, supports many databases out of the box, and has some nice features I've not seen in other tools.

  45. Passing parameters? easy! by YetAnotherLogin · · Score: 2, Informative

    Try this one:

    CREATE FUNCTION name(int) RETURNS SETOF test AS '
    SELECT * FROM test WHERE id=$1;
    ' LANGUAGE SQL;

    Then try using:

    select * from name(1);

    Should work pretty well.

  46. Re:Maybe because MySQL has fewer gotchas? by jdoeii · · Score: 2, Interesting

    IMO, it has a "very steep" learning curve because so many people have to unlearn all the bad habbits from MySQL

    Read your next statement Sadly, select count(*) is still slow and don't imagine that changing any time soon. Is using count(*) a bad MySQL habbit? PgSQL is difficult because it has unusual problems, not expected from experience with Oracle/MSSQL/MySQQL.

    As for aggregates, I know PgSQL functions can't use indexes by design. But addressing the most common cases of COUNT/MIN/MAX/SUM and maybe AVG might be possible. For example, MIN/MAX queries can be rewritten with ORDER/LIMIT 1. It's really unexpected for someone new to PgSQL (but with a lot of experince with other databases) that COUNT(*) on large tables is unuseable AND there is no work around.

    Assuming you had it configured properly, to correctly reuse all of your pages, you may still needed to run vacuum more than once per day.

    One quite capable DB admin worked on it full time for about two weeks, another one consulted. They tried everything imaginable. Still, running vacuum slowed selects by 5-10 times. That was not acceptable during the day, thus we could run it only at night. And that was not often enough.

    Two experienced people spent two weeks and failed to configure it for sufficient performance. Yes, you can say they were not experienced enough. I can also say that the configuration was overly difficult.

    I assume you mean as a non-dedicated server. Also, assuming you're running on Linux

    I mean a dedicated server, as in nothing but PgSQL 7.4 on a FreeBSD 4.9. Say, the DB is 1GB, server has 2GB RAM. PgSQL should just suck everything in RAM and run read queries directly from there. Why can't it do it? Or maybe it can, but how to configure it in such a way is really non-obvious.