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."
...and jump right to the beta announcement message.
The Army reading list
http://developer.postgresql.org/beta.php
the windows installer is at
http://pgfoundry.org/projects/pginstaller
http://bt.postgresql.org
why don't you tell us what the issues are instead vague statement with no real substance?
PHP is the solution of choice for relaying mysql errors to web users.
http://bt.postgresql.org
:)
Join the torrent!
What part of "A well regulated militia" do you not understand?
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.
Die IT theme.
I remember reading a document somewhere for mysql that explains what each part of a version number "really meant". The major version number meant that the format of the databases will change (or could change). Is this also the case for postgres I wonder?
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?
(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.
Yeah (what they said) and comparing dBase to
Postgres is like comparing a Toyota full of
muslims to an M1 Abrhams..
Is there a database (more heavyweight than SQLite) that allows you to specify where in the file system it keeps it's records?
Has any project ever built a IOSLAVE/VFS/LUFS filesystem bridge to a relational database?
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."
You have a couple of full text indexing options with postgres, just go into the contrib directory and install one. Wow, that was tough.
Apologies to Ziff-Davis...
... 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
...
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
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."
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.
I guessed you missed OpenFTS, which has been out for a couple years now.
... which you would know if you'd RTFA :P
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
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.
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.
The move to have a Win32 Native executable was to allow PostgreSQL to to compete with MySQL.
Synchronous replication is the only feature that will allow PostgreSQL to compete with Oracle. Mission critical backends need systems that stay entirely in-sync and if any one of the nodes fail, the system can fail-over to one of the other db's.
Master-slave just isn't sufficient.
I just wanted to say thanks to Fujitsu for helping pay for this
And thanks to Afilias (the guys who run the"Tablespaces allow administrators to select the file systems used for storage of databases, schemas, tables, or indexes."
"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
I'm big into Oracle, and use MySQL on my desktop for test databases. But the lack of views and such is driving me crazy.
What do you recommend for Windows software to handle PostgreSql?
I'm looking along the lines of something like SQL Navigator or Toad, but free.
Something to perform queries (with syntax coloring) and return results in nice tables, as well as other more administrative tasks.
Back in the 6.x days postgresql had a well-deserved reputation for being, well, slow. That was back in the '90s, though.
Why the red wheelbarrow ?
Shouldn't it be an Elephant, nickname Slonik (Russian for small elephant)
Apologies in advance for upper-case, but seems fitting to type SQL commands in that manner.
Is altering a column type consistent with the SQL-99 spec? Although I can see how useful this might be, I'd be very concerned about modifying table columns on the fly like this. How are type mis-matches handled? If there is a type mis-match, with the command continue, or roll back?
Same with Drop Column. I recall "way back when", the effort to modify a column was much more involved.
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.
Although it's not a Postgres issue, I'd like to see better support for it in Webmin. I know phppgadmin exists, but I prefer doing the simple stuff in Webmin, and there are numerous times I've tutted, and clicked, because the Webmin module doesn't let you do it, whereas the MySQL module does.
(Can't think of any right now, but there are things...)
Get your own free personal location tracker
That's the exact opposite of most peoples' experience.
(From someone who used to wear Oracle DBA as one of his hats.)
And Friday is Hawaiian Shirt Day. But ask yourself this, "Is this good for the company?"
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.
Uhh... "apparently" what? Oh! I see... hehehe... and all this time, they had no idea they were operating with such a flawed SQL parser. No wonder they had to go to all the trouble to implement 6 procedural languages, as well as their extended RULE system, custom datatype capability, etc... Poor guys...
;-)]
[Nice troll...
Tablespaces are nice, but they really need to create database files that can contain objects. This is a major feature that most of the big boys have.
That is you allocate one file to a certain size. The file is a collection of database pages. Each page can be used by a table or index to store data.
This makes for much faster backups, and management. I can detach a database, copy the file somewhere, and reattach. There is a lot less file overhead since you lock on to a few files, versus a different file for each table/index. If your db has 100's or 1000's or tables this can really create a lot of overhead. If each table has a handful of indexs this can really mulitply.
Also you can attach different tables and indexs to different files and create groups of files. Then you can span these file groups across different drive subsystems to get really really good performance. This can even allow you to put non crucial data in another file that can be put on a super cheap drives, like debugging information or such. Tablespaces at least allows you to do this.
File per object is one of those things that really seperates postgresql from true enterprise level databases. Having a write ahead log used to be the other. You really need a db system that deal with pages, not files.
All in all though this is an important step for postgres, and maybe we will see single database files in the next version.
Postgresql supports classic BLOBs perfectly well. It _also_ supports bytea (binary string) fields. Has done for a long time.
A couple (years?) ago there was an article about some SQL compatible database that was developed in academia which was much faster than even Oracle and was open source. But for the life of me I can't remember the name. Does anyone remember the artcle that was posted on slashdot about it?
Are you sure? Last time I checked it didn't know what "BLOB" means. If it finally found it's way into the Postgres code, then they should also put a note into their docs.
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.
Sure, they have a thousand "advanced features" and keep adding new ones day after day, but making the whole thing 8-bit clean would be nice too, eventually ;)
It's obvious that to them "advanced and custom datatype capability" sounds much cooler than support for "standard data types". It puzzles me why they so hardly fight the way everybody else does it.
How many versions of postgresql have gone by with that on the TODO list?
Is postgresql with the WITH RECURSIVE clause support pipedreamware or something?
File under 'M' for 'Manic ranting'
There's two ways to do binary types.
One way, of course, is to use a binary type, which can be tricky, depending on your client API. It mostly sucks if you are using an actual text-based insert query and response, whereas most of the time, there's *also* a way to use a more binary-oriented interface -- using the binary COPY interface and the relevant C API.
The other way is to use the large object support.
Gentoo Sucks
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?
I've seen some bad DBA's but that one takes the cake. :)
"Thanks to the remote control I have the attention span of a gerbil."
True, in this case it is MySQLs lack of standards compliance and features that allow it to store binary files into TEXT fields (I'm sure this in violation of the SQL standard) - since you cannot have any 8-bit value in UTF-8 strings.
And after all nobody should expect to get free string matching and regex features for BLOB fields anyhow (they're meant to be blackboxes). 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, despite the fact that it provides so much more possibilities everywhere else.
It is also important to remember that there was no provision for a standing army in the Constitution, as well.
Correct, and this was done on purpose. Jefferson, for one, wanted a provision to PROHIBIT a standing army except in times of war. He was unable to convince the majority of others to go along with this, though.
However, it is an irrelevant point. An army is there for the Federal Gov't, whereas the militias were for the States. The rights of the PEOPLE to bear arms was given so that the people and States could have an adequate defence against the Federal Gov't as well as foreign enemies. Trust of central gov'ts was not high considering the recent history of Revolution.
This is why all the arguments about protecting yourselves from criminals; guns for hunting; etc. are irrelevant. The 2nd Amendment is there exclusively to give the people the power to protect themselves from the Gov't, if necessary.
Learning HOW to think is more important than learning WHAT to think.
Gentoo Sucks
Heh. The funny thing is, I work at a Big Blue shop (they even buy IBM desktops). I've made multiple versions of DB2 shit themselves doing relatively benign things (a C udf, running fenced, for example, caused a 14 partition 8.1 DB2 warehouse on AIX 5.2 to spontaneously croak, all because I declared a return variable as varchar for bit data and treated it like a standard varchar; still no idea why, they never closed the PMR).
Once I had a db2 database here that would crash when you ran a backup (7.0 unpatched; it was a little neglected).
It's a great db, and a workhorse, but it's not rock solid. We find issues here all the time; even flakiness in the vaunted db2 query optimizer.
Only sad, that you didn't. That excerpt exactly told it: PG does not support the "BLOB" type, but instead introduces "BYTEA", which is very annoying to use (decoding on the client side is really backwards if you actually queried a database for your data). What I'm saying is, that you're often better off simply encoding anything into base64 before putting it into PG databases - in the end it comes down to that. It was already mentioned (not to say recommended) that way on their mailing lists, btw.
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.
Except that if you code it in base64, you'll blow up the size of the binary data, whereas if you'd use BYTEA or large-object support, you won't.
Gentoo Sucks
The reason I used mysql instead of postgres, last time I made that choice (6+ years ago) was because of the speed. Windows support didn't matter at all, only the blinding speed of MySql compared to old Postgres (http://mysql.matrix.com.br/information/benchmarks .html). My understanding is the Postgres has gotten much faster: Are there more recent benchmarks around?
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.
You really need to update your "known facts".
... except for MySQL's outstanding marketing.
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
Sincerely, Jan
It takes a real man to ride a scooter
I've lately read that one thing where PG shines is, that it actually would compress TEXT and *CHAR fields on-the-fly. And since base64 compresses quite well this would also accomodate any redundancy in binary files, so files may occasionally even become slower when stored this way (instead of in BYTEA fields).
Documentation is a bit slim but it's very nice and only takes a couple hours to figure it out the first time, and a few minutes to set up in future installs.
Here's a link.
From that site:
This Like That - fun with words!
"8 bit clean"? Oh, now you've convinced me... So the fact that I have the inconvenience of running my data through escape_bytea() before storing it as a binary string is THE major reason why PostgreSQL shouldn't be used? That discounts anything else about what a DBMS should do?
Yeah, PostgreSQL doesn't support 'standard' data types, and MySQL does? I really hope someone isn't reading this thinking you are serious. (You are not serious, are you?). MySQL's support for real datatype constraints is so bad that it should be considered typeless.
The whole point of a serious DBMS like PostgreSQL is not to allow your data to do things it shouldn't. If you don't want constraints or real data integrity, then fine; Use MySQL. Just be aware that your application still has to reimplement half the things that the DBMS normally handles.
..Mysql is more friendly towards programmers.
:)....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.
:) I'd still take Postges over MySQL any day.
Are you kidding me? If you like to do everything in your app that _should_ have been handled by the DBMS then yeah, sure
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
What a rotten party, have we run out of beer or something?
Mysql is still able to read and write ancient databases (the ISAM format was defined in 1986 and can still be read).
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.
Ummm....
So you cause you string to take up more space, then count on the compression being good enough to undo that, sucking up CPU all of the time, because you don't *like* the format that the standard text format of the binary is. You do know that most of the APIs provide functions to translate these sorts of things for you already.
Doesn't make sense to me.
Do you *know* what compression format it uses for text and the paramaters thereof? Just because it says that it uses compression doesn't mean that it will do a good job of compressing base64. Have you run tests to see if you are, in fact, correct about this?
Gentoo Sucks
shoulda been .msi, not .mis.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
My experience has been that saying MySQL can't handle load is like saying it gets hot in Texas in the summer. :)
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.
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.
Right, but tha APIs BYTEA unencoding functions typically use regular expressions to do the trick. En/Decoding everything to base64 is faster than to/from the format the PG-guys have choosen. Both is a pain in the ass regarding CPU cycles; but what really makes this whole story annoying to me, is that you're forced to do it _client-side_ anyway. That's where PG is behind others.
And no: I didn't have run any tests on this - I just take it for granted if the docs tell me. And wether they use gzip or straight deflate doesn't change that much. Unless they use RLE, larger files _will_ get smaller this way on disk, unless they're not any further compressable things like PNG or JPEG images.
When I said PostgreSQL was more friendly towards the database administrator I was talking about administering the data, not the DBMS (these are not quite the same)
There are tasks that are impossible to acomplish in MySQL because of the lack of features. For instance, How do you implement an audit trail within the DB in MySQL without triggers? Answer: you can't. You have to do it in your app (which can be easily bypassed) Now... I am willing to trade some point and click easy to administer interface or syntax any day if in return I have more control over which data enters the database.
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
I didn't talk about the inconvinience to run some escaping function before I throw data into the database, I refered to the fact that I'm forced to _unescape_ it everytime AFTER it's gone into the database. The database server can keep it's stuff in whatever format it wants, it just shouldn't expose ugly internals to the clients (which like in this case had to do post-processing on behalf of the DBMS).
I didn't say that data storage is the most important thing to do with a real DBMS (then everybody would still be using BerkelyDB), but storing DATA is an important task for DATAbases - all the search and calculation features are nice extensions, nothing more.
Come on guys, the troll has a point. The encoding issues with bytea need to be added to the PostgreSQL-gotchas page ;-)
It takes a real man to ride a scooter
Yes, ok, someone has worked on it. But as you already said, it is not a thing one would want to / could do via SQL in Postgres. The API functions you pointed to clearly resemble BerkelyDB features; just extended by network access. If you can write custom applications and use the C API everything is fine.
Actually I'm favouring the text-based query+insert database interface, as you call it; and so it looks not all too intuitive to use a specialized API for anything but text and numerics. But then again, this is perfectly fine for custom applications and it is of course a lot safer, faster and senseful to do it this way, the favourable way to say the least - but still: PG here failed on its transition to becoming a real SQL database I'd say. Not meant to be rude, just my point of view.
If you are competent enough to set up a database, you're competent enough to use escaping/unescaping functions.
That said, to make it transparent, just set a trigger and a view. Create a trigger on insert or update to the table in question to run the escape prior to saving to the table. After you've done this once, insert and update as normal from now on. Create a view that selects on the unescaped value. After you've done this once, select from the view as normal from now on.
It's nice that PostgreSQL allows folks to work around these "issues." I don't blame you for not seeing the possibility that people wouldn't want or care about escaped binary data in their database. With MySQL, failure to see possibilities is commonplace. Like for example the fact that triggers and views are probably unknown to you because MySQL doesn't have them. But even though they easily and elegantly address your "problem," I guess they're just "nice extensions."
And for the record, "data" is a piece of information. "Database" is the collection of information -- the collection of data. Storing data is an important task for "database management systems." All the search and calculation features are the raison d'etre.
- I don't need to go outside, my CRT tan'll do me just fine.
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
Postgres will probably support it in the long run (2-3 years?) after they rework their internationalization support. This will allow you to define a collation ordering for your columns. But on the other hand, perhaps you should not rely on case insensitivity, as it will limit you to only MySQL and SQL Server. Many other DB's act case sensitively (Oracle, PostgreSQL, DB2, ...)
Not only you can store binary data easily in Postgres, you can even *index* it (even if it's thousands of bytes long).
Can you do that with MySQL???
When I said PostgreSQL was more friendly towards the database administrator I was talking about administering the data, not the DBMS (these are not quite the same)
:)
Well, just goes to show how much I know about being a DB admin
I just meant that I don't agree with your idea that MySQL is better for programmers, it is not! And admins and programmers do not have opposing roles in this.
What a rotten party, have we run out of beer or something?
The features are getting in there... You make me laugh. Where are the *basic* things like triggers, stored procedures (only alpha), check constraints, etc? People have been waiting for *years*. MySQL development is getting slower and slower...
Problem with PG is that it is an old design that has been worked with for quite a while. Dude, MySQL design is even *older* (ISAM, for one). Postgres has relatively newer features like object relational.
If you're using bytea fields and Perl DBI
$bstring; #binary string
$id; #identifying attribute
$sth = $dbh->prepare("update x set y = ? where z = ?");
$sth->bind_param(1, $bstring);
$sth->bind_param(2, $id);
$sth->execute;
You may have to modify bind_param in the first case to $sth->bind_param(1, $bstring, DBI::SQL_BINARY), but I can't remember exactly how it goes.
In php, you have to be more explicit, with pg_escape_bytea and stripcslashes.
Engineering and the Ultimate
Interesting that so many americans believe that a hand gun is needed. Long guns, non automatic are all that should be allowed. If every citizen had a long gun, freedom would be preserved, and a hell of a lot of lives would not be wasted by impulse shootings.
What BYTEA encoding issues? You store *raw bytes* in BYTEA. As for quoting, you can use '\\000' to '\\377' to represent byte 0 - 255. You can store *anything* in BYTEA. So again, what encoding issues?
This is not even a good troll, not by far. Beta news is important, especially for a software that's used by many. It will encourage people to try it, and thus find more bugs. Postgres 8.0 in particular is important, as it introduces a new platform (win32). Slashdot also carries news about XP2 being delayed (and then re-delayed, and then again). That's even less interesting than Postgres 8.0beta news, in which new software are actually delivered.
Dude, with "kill -9" it will not be long until you corrupt PostgreSQL, MySQL, etc. too.
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.
I agree with you in general.
What I meant was this:
Many times I have heard programmers call, for instance, referential constraints "useless" (I know MySQL now has foreign key support), and think of them (and other integrity restrictions) just as a nuisance that they had to cope with.
These programmers think the DBMS has to accept any data they throw at it, in the way they throw at it
I was thinking on that when I said MySQL was easier for the programmer. Of course, you can say the same about PostgreSQL. Just don't use any integrity constraint.
The fact is that in many cases you don't have that option in MySQL (lack of features). On the other hand if you (DBA) have a DBMS which implements proper integrity constraints (PostgreSQL or other) it is unlikely that you choose not to use them.
So in the end, one of these programmers (not the good programmers, indeed) would feel that MySQL is "easier" because he won't have to code workarounds to recover from database "errors". MySQL would just happyly accept any SQL sentence provided it is syntactically correct, whereas other databases could refuse to execute the same sentence if it violates some constraint.
Every place I have worked has had at least one or two (if not more) old PCs lying around doing nothing (and when I mean "old", I mean a couple of gens old - not dirt old). Simply waiting in the wings acting as spares. Furthermore, at all of my jobs there have been at least one *nix box.
So, turn that unused hardware into something useful - drop BSD or Linux on it (or some other *nix, or scrounge on Ebay for an old Sun box or something else cheap), and drop PostgreSQL on it - ODBC drivers on your Windows boxen and there you go: an easy, cheap (maybe even free) PostgreSQL development environment.
Just because you develop under Windows doesn't mean all of your development tools have to be under Windows...
Reason is the Path to God - Anon
You don't even need to go into that to show the problem with his sig.
Here is the text of the 2nd:
A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.
Now, allow me to change just a few words:
A well educated electorate, being necessary to the security of a free State, the right of the people to keep and read books, shall not be infringed.
Does the above mean that only the well-educated should be allowed to keep and read books? Of course not. The second clause stands on it's own. If the founding fathers had intended for only the militia to reserve their right to bear arms, they would have said "the right of the militia" not "the right of the people".
I can respect arguments that gun control laws are a good idea. I cannot respect arguments that gun control is constitutional.
Social scientists are inspired by theories; scientists are humbled by facts.
You're exactly right, of course. Those who say otherwise have no professional communication experience.
PgSQL had a very steep lerning curve even for people with experience in other databases. Various unusual stuff just popped up in places which could not be expected from previous experience elsewhere.
How about COUNT(*) and other aggregates? Is is still as slow in 8.0 as it used to be in 6.* and 7.*?
I guess 8.0 fixed a long standing problem of select ... where small_int_column=1 not using indexes. That was a serious problem for those just starting with PgSQL because it was totally unexpected.
MySQL is nearly maintanence-free. It just runs and runs. PgSQL needs VACUUM and friends. Once we tried to move a database (from MSSQL) with market data to PgSQL (I think it was 7.4). A lot of stuff was inserted, and a lot of selects performed. Running vaccum/vacuum analyze once in 24 hours was not enough! By the end of the day performance of selects was abysmal. Every time we ran VACUUM ANALYZE, it took longer, and longer, and longer.
What about the problem with memory management and cache? I see it's being addressed in 8.0. I have to test 8.0, but with 7.4 it was impossible to run PgSQL efficiently as a dedicated server - grab all available memory and cache everything aggressively. It was very frugal about memory even when it was not necessary.
And, of course, the query optimizer. But that's understandably difficult. I have to see if improvements in 8.0 are significant
How long have you been a professional armed person?
I have one year's experience in a terrorist zone under my belt. It doesn't make me part of the elite, but I think I can form a reasonably informed opinion.
Handguns in the hands of the non profesional are the number one cause of inocent deaths caused *by inocent* ( 'till then) shooters screwing up.
A sniper is orders of magnitude more efficient against armed forces than person with a handgun. Now try to imagine trying a coup d'etat in a country with a couple of hundred million snipers.
Hand guns are only slightly more effective than knives close range, and pretty useless long range.
This may be rude.. but I think you need to do more reading.
I have now implemented two huge applications (>100,000 LOBS)in postgresql using both LOB's and BYTEA, using Windows ODBC *and* the C API. The C API requires more work and is ofcourse rather custom/non-portable - so is MySQL's interface. The ODBC app code is EXACTLY like Oracle, MySQL, SQL Server, even MS Access. The first of these apps was written 3 years ago using LOB's and ODBC. I'm afraid to say that you may have to update you're view of PG - your opinions may have been valid at one stage, but certainly not for the last *3* years and I can provide proof of that..
I'm sorry if this seems harsh its just that I'm getting very tired of MySQL pundits who have no clue comparing MySQL to enterprise class DB's like Oracle/SQL Server/PostgreSQL (not that I'm saying u have no clue!!).
When your DB supports triggers,rules,stored procedures,views,extensible types,extensible operators,check constraints,functional indexes,better than row-level locking, full sub-selects etc.. then feel free to compare MySQL and PG again - until then keep playing with your toys.
(Sorry if this sounds harsh)
You mean that same ISAM format that doesn't support transactions, foreign keys, etc.? That ISAM table format?
In other news, if you can't make a dump of your database, how are you doing backups? You are backing up your database, right? Right? If it's a space issue, how about spending $130 for 200GB on a separate box for temporary storage? And days? C'mon! What are you using? A 233Mhz Pentium with a single IDE drive also doubling as a fileserver?
And finally, don't dump to SQL.
pg_dump --format=c
Faster; Smaller; More efficient.
- I don't need to go outside, my CRT tan'll do me just fine.
You missed the point completely. Some systems just can't stop for a dump/restore. EVER. And you cannot use PostgreSQL for such an operation because the developers can't descide how the data are supposed to be stored.
If my system manages to dump 20 000 rows per second and restore at a rate of 10 000 rows per second that means a 100M row database would need at least 4 hours for an upgrade. Try selling such a system to a large company. They will laugh. And 100M rows is not really that much - but it is to much for PostgreSQL if you want 24/7 operation. :(
I didn't say it had to stop. Granted pg_dump slows a system down, but the whole point was to allow hot backups.
That said, I get what you are saying, but in that case, how do you upgrade *anything* (and why)? What happens when a drive fails in your RAID? Do you wave your hands and wail because the speed has dropped during the array rebuild? How do you add drive space, memory, CPU power?
Really what you seem to be lacking, as other posters have mentioned, is redundancy in your database. Granted you will be back to a couple of days for the complete transition, but you are asserting a requirement that 90% of us do not need. Nevertheless, the synchronization option is relatively pain free and allows for the 24/7 uptime you require.
For the rest of us, it'll just be a few (ungodly at 3am) hours at most.
- I don't need to go outside, my CRT tan'll do me just fine.