[wp-hackers] PostgreSQL port status?

Jared Bangs jared at pacific22.com
Mon Oct 1 02:46:57 GMT 2007


On 9/30/07, Matt <speedboxer at gmail.com> wrote:
> There's nothing wrong with WP supporting multiple DBs, but doing so in a way
> that doesn't interfere with anything is the problem...
>

Yeah, I would think that if a drop in replacement for the wp-db file
could do the trick (although it would probably not be optimal), it
might be useful to add a hook at the point of $wpdb assignment, to
facilitate overrides by plugins rather than having to replace and/or
modify the core files.

I also imagine that there would have to be some performance trade-offs
with doing it that way; specifically involving potentially rewriting
every query (with regex, etc.) before it's executed.

Support on an "equal" level would probably be more complicated, as it
should involve replacing (or at least adding specific replacement
hooks for) any vendor specific SQL throughout the app.

The latter might be quite the undertaking, but I could see the value
in it. It would be especially useful to already have in place if the
situation ever came up where PGSQL (or any other DB) releases a new
version that breaks all speed records and becomes the clear choice for
performance, etc.

Whether that (and portability in general) is enough to justify all the
work required to get there is a matter that lots of people would
probably have strong opinions on, on both sides of the issue.

For me, it comes down to two things: (1) cost / benefit analysis (are
the potential gains worth the extra effort), and (2) would these types
of changes (to the core code to better facilitate portability) be in
line with the vision of the core devs.

The second will greatly impact the first. I'd be interested in helping
out with the changes just for the fun of it, but if the consensus is
that we don't want to go there (in core), it probably wouldn't be
worthwhile to prepare all the patches, etc.

- Jared


More information about the wp-hackers mailing list