Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-25-2005, 07:59 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default postgre

Anyone ever tried to run VB off of PostgreSQL?
Reply With Quote
  #2  
Old 06-25-2005, 08:50 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vB3.0 don't support other database types then MySQL. In vB3.5 Beta there are some still limited methods build in that could possibly be used to support more database types. At this moment however there is no support for this.
Reply With Quote
  #3  
Old 06-26-2005, 05:08 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
vB3.0 don't support other database types then MySQL. In vB3.5 Beta there are some still limited methods build in that could possibly be used to support more database types. At this moment however there is no support for this.
Yeah I know it does not. But I was wondering if anyone hacked it.
Reply With Quote
  #4  
Old 06-26-2005, 09:47 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be a huge hack. A lot of MySQL specific SQL-commands are used.
Reply With Quote
  #5  
Old 12-09-2005, 08:30 PM
Brains Brains is offline
 
Join Date: Sep 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A HUGE hack indeed

BUT ....

I've just about completed it. I'm in the final bug testing stages right now in fact. I also wrote a quick and dirty app to migrate existing forum data from MySQL to an existing PostgreSQL database (created by my ported vB installer). Once I have a few million posts loaded into it, I'll be doing some stress testing and performance measurements, which will then undoubtedly lead to some work on index optimization and what not. With three forums, about a half dozen "users" online at once, and 600 posts, it absolutely flies though I'd like to see at least 1500 to 2000 concurrent users online, with 4+ million posts, all features active, utilizing two servers (1db + 1httpd).

I've done my best to stay close to SQL92 throughout, but there's some PG-specific syntax and functionality I left in there in the interest of time. A few other things, instead of completely re-writing sections of code, I simply made stored procedures for. A *LOT* of areas I cleaned up the existing vBulletin code for more efficiency. As I have plans to use this in a production environment, I also coded everything with the intention of it being maintainable, so I can stitch in updates from Jelsoft as they come in. I converted vB 3.5.0 so the real test will be my upgrade to the latest version (3.5.2 at the time of this posting).

I originally had the thoughts of testing against a couple of the "big name" DB engines (IBM DB2 UDB 8.2, Oracle 10g, and Sybase ASE 12.5.2 specifically). Now that I've done all this work with Postgres, I think I'll just cut the strings for now and finish up. lol. Its simply astounding how much effort this has taken to completely port vBulletin over. I started back in early November, and am just now finishing up with the last dozen or so bugs. Definitely not an easy "hack," and to support it will take someone very fluent and comfortable with PHP, and both MySQL / PostgreSQL. At some point, I'm sure Jelsoft will keep moving towards a package that will natively support multiple database backends as well.

The first iteration, I'll be testing with the built-in search engine, we'll see how that works out. I'm going to be installing the Tsearch2 module into PostgreSQL, and switch over to fulltext searching and try that out as well. I'm definitely curious to see which method excels in which areas. I'm also going to set up multiple machines, and bring up a PostgreSQL replication set ("cluster", if you will). That should mesh very easily with vB's built-in master/slave server code.
Reply With Quote
  #6  
Old 12-09-2005, 09:53 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you keep up to date if you have been working on this since November? I managed to hack in a DB abstraction layer into vbulletin but all the updates are a hassle. :<
Reply With Quote
  #7  
Old 12-10-2005, 01:35 AM
Brains Brains is offline
 
Join Date: Sep 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you have a running, functioning system on a DB backend other than MySQL? I'd be very interested to learn of your success and/or failures, and in which areas. I'm just getting to the testing portion (migrating data as we speak, in fact).

Updates won't be straight-forward, for sure. Thus far I haven't gone through one at all -- I simply ran the (converted) vBulletin installer, which generated a clean new system with a PostgreSQL backend. I then wrote a very simple app that does nothing more than truncate the PG tables, and then select data from MySQL tables and insert it into the PostgreSQL tables. My plan is to grab each set of changed PHP files and simply do a DIFF against the original Jelsoft-delivered code. Once I have a clear idea of what changed, manually patching in the changes should be relatively straight forward. The PHP upgrade scripts in the /install folder will need to be tweaked for each update though, so the database changes are applied properly. Those should not be too tough.
Reply With Quote
  #8  
Old 12-10-2005, 11:55 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a working vb2 with the database abstraction layer DB (from Pear). I would work on it again, but updates are such a hassle. Don't really have the time to diff each file and migrate changes.

Lately I thought about doing "something" inside vbquery(). But that would involve parsing the query itself. So one could get around MySQL specific functions and SQL.
Reply With Quote
  #9  
Old 12-11-2005, 12:35 AM
Brains Brains is offline
 
Join Date: Sep 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahh, I see... I took a much more "traditional" porting approach, and changed all the code over to more SQL92-style queries throughout, and then wrote a new class-core.php that supports PostgreSQL. With further tweaking, the application would be able to directly support both MySQL or PostgreSQL with just a change in config.php (instantiating the proper class in class-core.php). Doubtful that I'll finish that up, because PG is doing what I want it to, but the possibility is there.
Reply With Quote
  #10  
Old 12-12-2005, 01:12 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brains
Ahh, I see... I took a much more "traditional" porting approach, and changed all the code over to more SQL92-style queries throughout, and then wrote a new class-core.php that supports PostgreSQL. With further tweaking, the application would be able to directly support both MySQL or PostgreSQL with just a change in config.php (instantiating the proper class in class-core.php). Doubtful that I'll finish that up, because PG is doing what I want it to, but the possibility is there.
The problem is that when you do this you always have to re-update your code, when VB comes out with a new version. And I am just not willing to do this for every XSS they discover.

Which is why I thought about creating a sophisticated parser which is run inside vbquery().
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05049 seconds
  • Memory Usage 2,254KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete