|
|
Subscribe / Log in / New account

PostgreSQL 9.0 arrives with many new features

This article brought to you by LWN subscribers

Subscribers to LWN.net made this article — and everything that surrounds it — possible. If you appreciate our content, please buy a subscription and make the next set of articles possible.

September 21, 2010

This article was contributed by Josh Berkus

Version 9.0 of the PostgreSQL database management system was released on September 20, with considerably more "buzz" than a PostgreSQL release has had in a while. The PostgreSQL Project does a major release every year, but this one is special. It has more than a dozen major features and nearly 200 minor improvements, so the release has more new goodies in it for database geeks than any release before it, hence the "9.0" version number.

It includes some things which users have been requesting for years, such as built-in replication. Given this large number of new features, I'm not even going to try to cover them all; instead, I'll pick five very different features as examples and you can read about the rest on PostgreSQL.org.

Binary replication

PostgreSQL 9.0 includes a new mechanism for replicating entire databases which uses binary logs to replicate between servers. Since this is very similar to Oracle's Hot Standby Databases, it is often also called "hot standby". While PostgreSQL already has several other replication tools, including Slony-I, pgPool2, and Bucardo, binary replication supports greater scalability and availability for the majority of PostgreSQL users. It is also simpler to configure and initialize for the most basic configuration: two identical databases with failover.

This feature is also expected to help push PostgreSQL in cloud hosting and software as a service (SaaS) environments. Overhead for each standby database is very low, allowing a single master to support tens or even hundreds of standby databases. Binary replication also works quite well together with virtual machine and filesystem cloning tools.

Binary replication works by copying the binary change logs, called "transaction logs", from one server to another. This builds on the mechanism used for "warm standby" in PostgreSQL for several years, with two important differences: you can now run queries on the standby server(s), and logs can now be shipped continuously over a database port connection. The latter also decreases latency between servers, allowing the standby server to be only a fraction of a second behind.

The new replication was a large, community-wide effort which took two years. Most of the work was done by developers working for 2nd Quadrant and NTT Open Source, but also includes contributions by developers for EnterpriseDB and Red Hat. Plans for 9.1 include administration tools, standby promotion, and synchronous replication.

New triggers

PostgreSQL applications frequently put a lot of programming into the database itself. This includes triggers, which are scripts that execute whenever data changes. PostgreSQL 9.0 expands this capability with two new kinds of triggers: column triggers and conditional triggers.

Column triggers are defined in the ANSI SQL Standard. These triggers execute only when data in that specific column changes. Imagine a database where you want to log a message every time a user changes their password, but not for other kinds of changes. You could define a trigger like so:

    CREATE TRIGGER password_changed
	AFTER UPDATE OF password ON users
	FOR EACH ROW
	EXECUTE PROCEDURE password_changed_log();

Conditional triggers are a PostgreSQL-only feature. A conditional trigger executes whenever a specific condition is met, but not otherwise. For example, imagine that you have a database of e-mail users and you want to freeze accounts whenever total storage goes over 5MB:

    CREATE TRIGGER freeze_account
      AFTER UPDATE OF mail_accounts
      WHEN ( total_storage > 5000000 )
      FOR EACH ROW
      EXECUTE PROCEDURE freeze_account_full();

New security features

Given the widespread concerns about database security in the industry, it's no surprise that PostgreSQL is adding new features to control access to data. First, PostgreSQL now supports RADIUS authentication, in addition to password, SSL, LDAP, PAM, and GSSAPI authentication. Second, large objects in PostgreSQL now have settable access permissions.

But the biggest new security feature is new commands to set blanket access permissions across an entire database or schema. This will make it much easier for web developers to make effective use of database permissions and prevent SQL injection attacks and other exploits. The first of these commands is GRANT ON ALL, which allows you to set permissions for a specific type of object over the whole database:

    GRANT SELECT,INSERT,UPDATE ON ALL TABLES IN cmsdata TO webcms;

The second command is SET DEFAULT PRIVILEGES, which allows you to define a set of permissions for each new database object created by users:

    ALTER DEFAULT PRIVILEGES FOR ROLE webcms IN SCHEMA cmsdata 
    GRANT SELECT,INSERT,UPDATE ON TABLES;

Either of these tasks would previously required writing a script to iterate over each object in the database.

HStore: key-value PostgreSQL

The renaissance of non-relational databases, or "NoSQL movement", has had an influence on PostgreSQL as it has on everyone else. One such influence is the HStore optional module included in version 9.0, which implements a key-value store inside PostgreSQL.

HStore has been available in previous versions of PostgreSQL, but built-in limitations made it only useful for a trivial set of tasks. Those limitations are now gone and there are new features of HStore, like key manipulation functions, as well. Application developers can now use HStore for most key-value tasks instead of adding an additional key-value database to their application infrastructure.

For example, say you wanted to store user profile data as a set of key-value data. First, you'd load HStore, since it's an optional module. Next, you'd create a table:

    CREATE TABLE user_profile (
	    user_id INT NOT NULL PRIMARY KEY REFERENCES users(user_id),
	    profile HSTORE
    );

Then you can store key-value data in that table:

    INSERT INTO user_profile 
    VALUES ( 5, hstore('"Home City"=>"San Francisco","Occupation"=>"Sculptor"');

Notice that the format for the HStore strings is a lot like hashes in Perl, but you can also use an array format, and simple JSON objects will probably be supported in 9.1. You probably want to index the keys in the HStore for fast lookup:

    CREATE INDEX user_profile_hstore ON user_profile USING GIN (profile);

Now you can see what keys you have:

    SELECT akeys(profile) FROM user_profile WHERE user_id = 5;

Look up individual keys:

    SELECT profile -> 'Occupation' FROM user_profile;

Or even delete specific keys:

    SELECT profile - 'Occupation' FROM user_profile WHERE user_id = 5;
    UPDATE user_profile SET profile = profile - 'Occupation' 
    WHERE user_id = 5;

JSON & XML explain plans

Like other enterprise SQL databases, PostgreSQL allows users to examine how each query is to be executed in order to optimize database access. The query plan is called an "EXPLAIN plan", and previously was available only as an idiosyncratic text format. For example, a simple single-table sort query might be displayed like so:

     Sort  (cost=1.05..1.06 rows=305 width=11)
       Sort Key: forum_name
       ->  Seq Scan on forums  (cost=0.00..1.03 rows=305 width=11)  

While the above text is fine for a database administrator who is troubleshooting specific queries, it is terrible for any form of automated processing, especially since the text changes slightly for each version of PostgreSQL. So developers Robert Haas and Greg Sabino-Mullaine added some new formats for EXPLAIN plans, including XML:

    <explain xmlns="http://www.postgresql.org/2009/explain">
      <Query>
	<Plan>
	  <Node-Type>Sort</Node-Type>
	  <Startup-Cost>1.05</Startup-Cost>
	  <Total-Cost>1.06</Total-Cost>
	  <Plan-Rows>3</Plan-Rows>
	  <Plan-Width>11</Plan-Width>
	  <Sort-Key>
	    <Item>forum_name</Item>
	  </Sort-Key>
    ...

and JSON:

    QUERY PLAN
    [
      {
	"Plan": {
	  "Node Type": "Sort",
	  "Startup Cost": 1.05,
	  "Total Cost": 1.06,
	  "Plan Rows": 3,
	  "Plan Width": 11,
	  "Sort Key": ["forum_name"],
	  "Plans": [
    ...

This feature is designed to encourage the development of new tools to analyze explain plans and suggest database improvements.

Changes in the PostgreSQL project

It's not just the PostgreSQL database which is changing rapidly; there have been changes in the project and community as well.

During September, the PostgreSQL project is finally moving to the git version control system from CVS. This move was planned before the 9.0 release, but technical difficulties have prevented it from being completed yet; this may be the topic of another article. The PostgreSQL home page is also migrating from an ah-hoc web framework written in PHP to the popular Django web framework.

Most of all, though, what has changed is project processes and attitudes, which have allowed the PostgreSQL project to add dozens of new contributors over the last two years. Selena Deckelmann, PostgreSQL major contributor, described the changes this way:

We started the process toward 9.0 last year when we added new committers and invited many new people into the CommitFest process (our way of getting lots of patches reviewed, approved and committed every two months). What we've found is that we can engage new developers by providing a clear way for them to help in small, well-defined ways.

As a group, we work really hard to recruit and maintain long-term relationships with developers, and that investment in people has paid off really well in 9.0. We have long term commitments from volunteers and independent businesses to implement features that take multiple years to see through to completion. The binary replication is a clear example of that, and we have many other projects underway that are only possible because developers trust our core development team to see them through.

The future of PostgreSQL

The PostgreSQL project's developers are already on to version 9.1; in fact, the second CommitFest for 9.1 has already started. Features currently under development include synchronous replication, SQL/MED federated tables, security label support, per-column collations, predicate locking, benchmarking tools, and new XML functions. Additionally, Google Summer of Code students created draft patches for JSON support and the MERGE operation.

"We have seen incredible increase in the volume of activity within the PostgreSQL community, in user base, development, and infrastructure." commented core team member Bruce Momjian.

The future certainly seems bright for what was once the "other open source database".

Index entries for this article
GuestArticlesBerkus, Josh


(Log in to post comments)

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 19:42 UTC (Tue) by flewellyn (subscriber, #5047) [Link]

This is an impressive catalog of new features. Of course, the one that interests me most is the binary replication, but the ability to set schemawide and default permissions is going to be a huge boon as well.

I'm extremely dubious, on the other hand, of the utility of HStore. Not because I think the PostgreSQL implementation of key-value stores is faulty (I certainly would think not!), but because I'm dubious of the utility of simple key-value stores in a world where we have relational capability. But, if people are going to ask for it, I suppose there's nothing wrong with PostgreSQL providing it. Particularly since this way you don't have to choose between having two incompatible database systems, or sacrificing full relational capability, to have your simple key-value store.

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 19:54 UTC (Tue) by ScOut3R (guest, #69996) [Link]

Yes, replication looks promising. Is there any documentation how it handles stuff under the hood? My biggest concern is how it handles stored procedures.

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 20:04 UTC (Tue) by andresfreund (subscriber, #69562) [Link]

Its binary log shipping - its shipping the write ahead log (which is also used for crash-safety) to the standby which does a "nearly normal" recovery.
The only difference is that it allows you to connect to it after it reaches a stable point.

So, the usage of stored procedures shouldn't matter...

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 20:23 UTC (Tue) by ScOut3R (guest, #69996) [Link]

Thank You for the clarification!

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 11:59 UTC (Wed) by smurf (subscriber, #17840) [Link]

> So, the usage of stored procedures shouldn't matter...

..., except that said stored procedure affects something outside of PostgreSQL. I might actually want that to happen on the backup server too.

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 17:28 UTC (Wed) by captrb (guest, #2291) [Link]

That seems like a fragile way to do things. Rather than have stored procedures cause side effects outside the database, what if you published events to a listen/notify queue, then have external processes reading the queues and cause the external state change. Have multiple queues for multiple recipients. The master and backup server would read the events from the currently-active database, failing over like the rest of your applications.

Slave servers vs. Stored Procedures

Posted Sep 22, 2010 18:55 UTC (Wed) by smurf (subscriber, #17840) [Link]

The operative word here is "queue". If I want to keep the database and the external world in sync, I can't queue my changes.

Of course, it's a trade-off, and has its own pitfalls (what if the stored procedure works on the master but fails on the slave?). But so has every other solution.

PostgreSQL 9.0 arrives with many new features

Posted Oct 3, 2010 22:50 UTC (Sun) by Wol (subscriber, #4433) [Link]

If you're worried about that, shouldn't you be using transactions as well as stored procedures?

And in the databases I use, using a stored procedure like that would cause the application to fail - "side effects are not permitted in a transaction!".

Cheers,
Wol

HStore syntax

Posted Sep 21, 2010 20:31 UTC (Tue) by epa (subscriber, #39769) [Link]

The article gives an example of deleting a key:
SELECT profile - 'Occupation' FROM user_profile WHERE user_id = 5;
Is this right? You can mutate the data with a SELECT statement?

HStore syntax

Posted Sep 21, 2010 20:59 UTC (Tue) by andresfreund (subscriber, #69562) [Link]

It doesn't delete any stored value - the value returned by the select is modified.
If you wanted to modify the stored value you would need an UPDATE...

HStore syntax

Posted Sep 21, 2010 21:29 UTC (Tue) by dskoll (subscriber, #1630) [Link]

Josh's example reads Or even delete specific keys:

I assume he means: Or even delete specific keys from the return value of SELECT. At least I hope that's what it means...

HStore syntax

Posted Sep 21, 2010 21:38 UTC (Tue) by jberkus (guest, #55561) [Link]

Actually, that was a paste-o which neither I nor my proofreader caught. The example, of course, should have been:

UPDATE user_profile SET profile = profile - 'Occupation'
WHERE user_id = 5;

HStore syntax

Posted Sep 30, 2010 23:57 UTC (Thu) by MattPerry (guest, #46341) [Link]

Can the SELECT statement be removed from the article? Having it there, lined through or not, is still very confusing.

HStore syntax

Posted Oct 1, 2010 3:16 UTC (Fri) by jake (editor, #205) [Link]

> Having it there, lined through or not, is still very confusing.

The problem is that folks reading the comments will get confused as well, which is why I left it in but with strike-through. Is it really that unclear that it is a fix?

jake

HStore syntax

Posted Oct 1, 2010 18:42 UTC (Fri) by MattPerry (guest, #46341) [Link]

> Is it really that unclear that it is a fix?

Yes, it was. I had no idea what the strike-through was supposed to signify so I ignored it and then spent time wondering why a select and then update would be needed.

> The problem is that folks reading the comments will get confused as well

A better way to handle that is to just reply to the comments in question and mention that you have fixed the problem. Most people will read the article before the comments and struck-through text provides information with no value.

Mutating with SELECT

Posted Sep 28, 2010 1:06 UTC (Tue) by ringerc (subscriber, #3071) [Link]

While that specific example was an error in the article, yes, it is possible to mutate data with SELECT. SELECT may invoke stored functions - written in C, SQL, PL/PgSQL, PL/Perl, etc - that mutate data. SQL and PL/PgSQL functions invoked from SELECT may use any SQL, including INSERT/UPDATE/DELETE but also DDL. Other languages may use the SPI to affect the database's state and contents.

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 21:46 UTC (Tue) by jberkus (guest, #55561) [Link]

The primary utility for an added key-value store is for attributes which need to be extended at runtime, and don't need referential integrity.

A good example of this would be a multi-tenant "personals" site where most of the search criteria were built-in (age, height, weight, marital status, etc.) but where each reseller of the service was allowed to add additional "profile items". Or a web CRM (think SugarCRM) where each salesperson was allowed to add their own "tags".

The alternatives to do this in SQL are all unpalatable: Entity-Attribute-Value tables (crappy performance, huge on-disk size), DDL at runtime (dangerous), or "option_1_id" columns (awkward & confusing to query).

Of course, if you're using Hstore for your core application data, then you're probably using the wrong database. But there's a lot of cases where applications need something like a key-value store for *just one thing*.

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 22:09 UTC (Tue) by flewellyn (subscriber, #5047) [Link]

I've written applications that do controlled DDL at runtime without problems. I don't see why that's so dangerous.

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 22:19 UTC (Tue) by jberkus (guest, #55561) [Link]

In order for the application to make DDL changes at runtime, the application role needs to have unrestricted permissions on at least some tables. This creates a security hole if the web application is compromised.

The alternative is SECURITY DEFINER functions. However, most web developers don't care much for stored procedures. And, like setuid bits on files, security definer functions are potentially dangerous if not completely locked down.

In either case, you've given someone a complex way of solving their problem which requires more than a bit of database knowledge. If that person is a web GUI developer who is Just Trying To Get The Job Done, they instead end up running the web app with superuser or database owner permissions. As, indeed, SugarCRM did (and maybe still does).

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 5:06 UTC (Wed) by flewellyn (subscriber, #5047) [Link]

Fair enough. I suppose if all you need is extensible attributes without integrity checks, runtime DDL is overkill as well.

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 11:36 UTC (Wed) by tialaramex (subscriber, #21167) [Link]

Flexibility is also (at least for now) the key reason to look at an RDF storage engine.

I guess from a relational database perspective these are just "Entity-Attribute-Value tables" except that of course the attributes and values are also (potentially) entities...

If you actually have a schema that reflects your system's unchanging reality, an RDBMS remains an excellent choice, with lots of mature offerings, excellent performance, etc. RDF will not ever be a competitor for the certainty of "Every X has exactly one Y, which is a unique integer" if you can bludgeon reality to fit such rules.

The interest in key-value stores suggests that more and more people are realising that their problem isn't entirely amenable to this approach. But I'd argue that key-value is not quite flexible enough either.

But it could be that I've been using a hammer so long that now all the more sophisticated problems just look like they haven't been hit hard enough or from the right angle.

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 18:31 UTC (Wed) by jberkus (guest, #55561) [Link]

tialaramex,

There are definitely problems for which RDF is the right answer, and trying to use a relational database for those problems is painful at best. For example, while you *could* do a semantic web thing using a relational database, you wouldn't want to.

On the other hand, there are definitely tasks for which RDF is wildly unsuitable. Just at the moment, I'm working on an inventory management application. Again, you could do such a thing in RDF, but you'd very quickly regret it.

Any database is a model of your real-world data. All models require reductionism, and thus the model format you use should be based on what it is you want to do with the data you have. Claims that one or another data model form is "more realistic" or "more natural" than another are specious. All models are equally artificial.

PostgreSQL 9.0 arrives with many new features

Posted Oct 3, 2010 23:01 UTC (Sun) by Wol (subscriber, #4433) [Link]

Hmm...

Speaking as a mathematician, all models are equal, true.

But speaking as a scientist, that's not true!

Some models (Newtonian Mechanics) are good enough. Some models are a very good fit (Relativity). And some models are just plain irrelevant (toroidal geometry on a ball).

Pick the right model. The "more natural" one. Because the wrong one doesn't approximate to nature (reality).

Cheers,
Wol

PostgreSQL 9.0 arrives with many new features

Posted Sep 24, 2010 12:59 UTC (Fri) by dmag (guest, #17775) [Link]

> I'm extremely dubious, on the other hand, of the utility of HStore.

Here's two reasons to use HStore:

1) It can turn O(N) operations into O(1)

Imagine trying to implement "Facebook-like" friend list: Every time a user hits their home page, the DB needs get their "friends". In a typical join table, this will take O(N) disk seeks.

So you think about storing the friend's names right on the user object, maybe as a string. But it will be slow -- you have to parse the string (server-side inside a transaction) to modify it.

So you think about a cache. But that just introduces new problems. ("There are two hard problems in Computer Science: Naming and Cache Invalidation.")

With a HStore, you don't need a cache -- It's O(1) to get friend list, and O(1) to modify it. Of course, the trade-off is duplicate data. (That's not a NoSQL thing. SQL people are always denormalizing for performance. (e.g. "total_order_price" or "num_friends")

2) It's a lot simpler. You have a user object (row) with an HStore friends column. You add friends to it, you subtract friends from it, you get all the friends. You don't need a fancy ORM to hide the complexity of messing about with multiple tables and extra IDs. (The trade-off is no FK checking. But MySQL proved we don't need it ;)

If you squint, HStore is really more like a Docstore than a Key-Value store. (A pure KV suffers from "last in wins" problems because you can't do sub-operations on a value. Only Get and Set.)

PostgreSQL 9.0 arrives with many new features

Posted Sep 24, 2010 15:47 UTC (Fri) by bronson (subscriber, #4806) [Link]

In your example you're using hstore as a cache, right? You still need to invalidate it.

Or, if you always store a new value whenever the friends list changes, then you could just do that with memcached, redis, etc. I'm not seeing the difference.

Other than being built into Postgres, of course. That's nice, but given how easy memcached and redis are to set up, not a big deal.

PostgreSQL 9.0 arrives with many new features

Posted Sep 24, 2010 18:06 UTC (Fri) by dmag (guest, #17775) [Link]

> you're using hstore as a cache, right?

Yes, but with "HStore as a cache", you can do your cache updates in a transaction. The biggest problem with external caching is keeping them in sync. (To keep it in perfect sync, you'd need to build your own 2-phase commit.)

I can also imagine non-cache uses. For example, "has this user seen this announcement?". Seems silly to create a new table for that.

HStore is just "one more tool in the toolbox". The future of data is all about "picking the right tool", which requires knowing the engineering tradeoffs. (Actually, today it's more like "figuring out the engineering tradeoffs", but it will get easier.)

PostgreSQL 9.0 arrives with many new features

Posted Oct 3, 2010 22:47 UTC (Sun) by Wol (subscriber, #4433) [Link]

imho (and a lot of people won't like me saying this) relational TECHNOLOGY is broken.

I use Pick - a system that's built on "key, value". PROVIDED that value is a normalised array, the resulting system is a SUPERSET of an RDBMS, with the added advantage that I can prove that successful optimisation is not possible :-)

(By that I mean that unoptimised queries are so efficient that there is no "headroom" available for an optimiser to make gains, not that optimisation can't be done. Just that even for a perfect optimiser, the cost is likely to outweigh the benefits.)

The downside, of course, is where I used the word "provided". Pick is like C - it doesn't enforce good practice. otoh, I liken relational to Pascal - when implemented strictly it gets horribly in the way of actually doing any work :-)

Cheers,
Wol

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 22:08 UTC (Tue) by jberkus (guest, #55561) [Link]

An addendum: PostgreSQL's migration to Git is now complete.

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 2:24 UTC (Wed) by vonbrand (guest, #4458) [Link]

I'd love to read about that migration. Both technical and people-wise.

PostgreSQL 9.0 arrives with many new features

Posted Sep 28, 2010 1:41 UTC (Tue) by ringerc (subscriber, #3071) [Link]

The pgsql-hackers list has a public archive, and is where the vast majority of it was organized and discussed.

PostgreSQL 9.0 arrives with many new features

Posted Sep 21, 2010 22:49 UTC (Tue) by nix (subscriber, #2304) [Link]

Hang on. People are working on *predicate locking* for 9.1? OK, if that works I'll be officially in awe. I've never heard of any RDBMS supporting it, or even trying to. (Perhaps DB2 can do it: that's the only big RDBMS I have no experience with, and also the closest to magic alien technology.)

PostgreSQL 9.0 arrives with many new features

Posted Sep 22, 2010 0:11 UTC (Wed) by jberkus (guest, #55561) [Link]

Amusing you should mention DB2. Yeah, they're the database we're trying to beat in terms of predicate locking.

The developer who wrote it, Kevin Grittner, is implementing some academic papers on how to do serialization and predicate locking which haven't previously been implemented. Part of that is already committed, so pick up the next Alpha at the end of this commitfest (around October 17th) and give it a spin. I know Kevin would love some feedback.

Need info

Posted Sep 25, 2010 21:53 UTC (Sat) by man_ls (guest, #15091) [Link]

Any good links on what "predicate locking" is? For once Wikipedia has failed me.

Need info

Posted Sep 26, 2010 17:47 UTC (Sun) by Jan_Zerebecki (guest, #70319) [Link]

Hstore and transactions

Posted Sep 22, 2010 19:39 UTC (Wed) by gera (guest, #43819) [Link]

I've never really used Postgres, so this might not be a very intelligent question to those who have - but do transactions work with Hstores?

As in:

- can a multiple Hstore changes be bundled in a transaction with the usual transaction semantics (rollbacks etc.)?

- can a transaction contain usual relational as well as Hstore changes?

If so, this is a big deal. IIRC none of the other document databases or key-value stores provide transactions.

Hstore and transactions

Posted Sep 22, 2010 20:27 UTC (Wed) by schabi (guest, #14079) [Link]

AFAICS, hstores are "just another plug-in datatype" like so many others (XML datastore and PostGIS geometries, for example).

So the hstore column is like a string, text or anything else part of the normal transaction mechanism.

Hstore and transactions

Posted Sep 23, 2010 9:48 UTC (Thu) by gera (guest, #43819) [Link]

Thanks. I'll try out Postgres soon then!

Hstore and transactions

Posted Sep 25, 2010 22:41 UTC (Sat) by mfedyk (guest, #55303) [Link]

"If so, this is a big deal. IIRC none of the other document databases or key-value stores provide transactions."

couchdb does have ACID capability. you just need to model your data so each transaction is one document. a document is either there or not there.

PostgreSQL 9.0 arrives with many new features

Posted Sep 23, 2010 17:11 UTC (Thu) by Tet (subscriber, #5433) [Link]

While the above text is fine for a database administrator who is troubleshooting specific queries, it is terrible for any form of automated processing

While the XML and JSON formats are a welcome improvement, automated processing has been possible even given the somewhat hostile nature of the previous output. See Daniele Varrazzo's dbplanview query plan visualizer for a good example.


Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds