Anybody used as postgresql database backend?

Anybody used as postgresql database backend?

stevencmonstevencmon Posts: 25Questions: 9Answers: 2

Link to test case:

Debugger code (

Error messages shown:
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 7 LOG: Error occurred when processing query: Unable to send message while query "" still in progress. QUERY: Extended Protocol Message LOG: Error occurred when processing query: Unable to send message while query "" still in progress. QUERY: Extended Protocol Message ERROR: unable to read data DETAIL: child connection forced to terminate due to client_idle_limit:300 is reached SSL SYSCALL error: EOF detected in /var/www/ Stack trace: #0 /var/www/ PDO->rollBack() #1 [internal function]: DataTables\Database\Query::rollback() #2 /var/www/ call_user_func() #3 /var/www/ DataTables\Database->rollback() #4 /var/www/ DataTables\Editor->process in /var/www/ on line 204

Description of problem:
Trying to use datatables editor with as a postgres database.

Query doesn't complete. times out after 300 seconds

standalone php pdo is able to query data. psql works ok too.



  • allanallan Posts: 55,815Questions: 1Answers: 8,814 Site admin

    It sounds to me like the query hasn't completed by the end of the 5 minute timeout. How large is your data set? That it says query "" is rather odd!

    I haven't actually heard of before - does their management console let you see the queries that have been run against your databases?

    And just to confirm, as you saying that the Editor PHP works with your own Postgres server, or that a PDO query against works?

    Can you show me your config.php (with the user / password / database all changed to 123 or whatever as well please?).


  • stevencmonstevencmon Posts: 25Questions: 9Answers: 2

    yes, well I was looking for "data cleansing" tools and ran across

    I'm not sure who they think that their customers really are. They promote that they're postgres based. However, they don't support the serial, decimal or numeric data types. So, off to the races they don't support your "generated" create table with a 'serial' id column. they also subset the functions available.

    It appears that in reality they want their customers to be able to upload spreadsheets and for their customers to "share" without emailing spreadsheets.

    I've successfully uploaded a 33MB CSV file with ~220K rows with no problem. Well, except that it doesn't do any data type determination and it appears that you can't create any indexes so joining tables will have to be horrid with the full table scans...
    So, this isn't going to be useful for my needs but you might be interested. If I had found all of the "potholes" I wouldn't have submitted this so you can close it.

    My table has exactly 1 row...

    I didn't set up a postgresql server but I might try that out but I'm happy with MySQL/MariaDB for now. I'll include my simple PHP/PDO code that works (along with it's response.)

    My "config.php" file:

    <?php if (!defined('DATATABLES')) exit(); // Ensure being used in DataTables env.
     * DB connection script for Editor
     * Created by
    // Enable error reporting for debugging (remove for production)
    ini_set('display_errors', '1');
     * Edit the following with your database connection options
    $sql_details = array(
            "type" => "Postgres",
            "user" => "username",
            "pass" => "password",
            "host" => "",
            "port" => "5432",
            "db"   => "bitdotio",
            "dsn"  => ""

    My PHP/PDO code:

    $db = 'bitdotio';
    $username = 'username';
    $password = 'password';
    $dsn = "pgsql:host=$host;port=5432;dbname=$db;user=$username;password=$password"
    try {
      // create a PostgreSQL database connection
      $pdo = new PDO( $dsn );
      // display a message if connected to the PostgreSQL successfully
      if ( $pdo ) {
        print "Connected to the <strong>$db</strong> database successfully!";
      $stmt = $pdo->query( 'SELECT *  FROM "scm/data_cleanse"."global_editing"');
      while ( $row = $stmt->fetch() ) {
        print_r( $row );
    } catch ( PDOException $e ) {
      // report error message
      print $e->getMessage();

    My PHP/PDO response:

    Connected to the <strong>bitdotio</strong> database successfully!Array
        [id] => 1
        [0] => 1
        [name] => remove NULL string
        [1] => remove NULL string
        [seq] => 1
        [2] => 1
        [from_string] => NULL
        [3] => NULL
        [to_string] => 
        [4] => 

    You've got a great tool that I've used for everything from equipment inventory management to data cleanup (comparing names that should be the same in different databases and tables to managing out timeline for what my spouse and I have done during the year (e.g. marking specific things for the holiday newsletter, mark when we're expecting visitor, just a general "what we did this year".)

    My only complaint is that I keep reviewing for the "new" features and keep mumbling to myself "why wasn't that available when I did project "x" :)

  • allanallan Posts: 55,815Questions: 1Answers: 8,814 Site admin

    Thank you for your kind words :)

    It sounds to me like don't support enough of Postgres to work with Editor. What strikes me as really odd is that it would timeout rather than just throw an error if that is the case though. Although perhaps it is just really slow... Not sure!

    I've not had a chance to try yet, but will do so later on. In the meantime, if you are interested, we have our own CloudTables product which is sort of similar - DataTables + Editor configured by the web interface, running on a Node and Postgres backend. 50k row limit at the moment, although I'm working on removing that.


Sign In or Register to comment.