PostgreSQL database driver (#5861)

* [test/database/list] Fix test list 4 being used in two different tests

* [database/postgres] PostgreSQL database driver

* [database/postgres] Make transactions work based on continuation scope.

* [database/postgres] Implement nested transactions

* eslint --fix

* Add database changes from earlier this week to the PostgreSQL driver.

* Fix typo

* Fix postgres.incrObjectFieldBy returning undefined instead of null when given NaN

* [database/postgres] Fix sortedSetsCard returning an array of strings.

* Update socket.io postgres adapter

* Fix PostgreSQL erroring when multiple updates are made to the same sorted set entry in a single operation.

Add a test case to catch this error.

* Fix lint errors.

* Only prune sessions on one instance in a cluster to avoid deadlocks.

They're caught and handled by the database server, but they spam the logs.

* Fix arguments.slice.
This commit is contained in:
Ben Lubar
2018-08-08 14:13:48 -05:00
committed by Julian Lam
parent 3cccbbc1f2
commit 33228bb7fe
34 changed files with 3166 additions and 10 deletions

View File

@@ -57,6 +57,19 @@
</div>
<!-- ENDIF redis -->
<!-- IF postgres -->
<div class="panel panel-default">
<div class="panel-heading"><i class="fa fa-hdd-o"></i> [[admin/advanced/database:postgres]]</div>
<div class="panel-body">
<div class="database-info">
<span>[[admin/advanced/database:postgres.version]]</span> <span class="text-right">{postgres.version}</span><br/>
<hr/>
<span>[[admin/advanced/database:uptime-seconds]]</span> <span class="text-right formatted-number">{postgres.uptime}</span><br/>
</div>
</div>
</div>
<!-- ENDIF postgres -->
<!-- IF mongo -->
<div class="panel panel-default">
<div class="panel-heading" data-toggle="collapse" data-target=".mongodb-raw">
@@ -84,5 +97,19 @@
</div>
</div>
<!-- ENDIF redis -->
<!-- IF postgres -->
<div class="panel panel-default">
<div class="panel-heading" data-toggle="collapse" data-target=".postgresql-raw">
<h3 class="panel-title"><i class="fa fa-caret-down"></i> [[admin/advanced/database:postgres.raw-info]]</h3>
</div>
<div class="panel-body postgresql-raw collapse">
<div class="highlight">
<pre>{postgres.raw}</pre>
</div>
</div>
</div>
<!-- ENDIF postgres -->
</div>
</div>

View File

@@ -102,6 +102,7 @@
<select class="form-control" name="database">
<option value="redis">Redis</option>
<option value="mongo">MongoDB</option>
<option value="postgres">PostgreSQL</option>
</select>
</div>
<div class="col-sm-5 help-text" data-help="Leave the fields blank to use the default settings."><!-- IF error -->There was an error connecting to your database. Please try again.<!-- ENDIF error --></div>