mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Added support for storing configurations of pgAdmin in an external database. #1832
This commit is contained in:
@@ -44,7 +44,7 @@ the **Flask-Security** module to manage application security and users, and
|
||||
provides options for self-service password reset and password changes etc.
|
||||
|
||||
Whether in desktop or server mode, each user's settings are stored in a SQLite
|
||||
database which is also used to store the user accounts. This is initially
|
||||
OR external database which is also used to store the user accounts. This is initially
|
||||
created using the **setup.py** script which will create the database file and
|
||||
schema within it, and add the first user account (with administrative
|
||||
privileges) and a default server group for them. A **settings** table is also
|
||||
|
||||
63
docs/en_US/external_database.rst
Normal file
63
docs/en_US/external_database.rst
Normal file
@@ -0,0 +1,63 @@
|
||||
.. _external_database:
|
||||
|
||||
****************************************************
|
||||
`External database for pgAdmin configuration`:index:
|
||||
****************************************************
|
||||
|
||||
The configurations used by pgAdmin are stored in the SQLite database.
|
||||
There are many settings stored in this database, like preferences,
|
||||
user accounts, auto-discovered servers, and many more.
|
||||
|
||||
In SQLite, the database is stored in a single file that may be located anywhere
|
||||
in the directory, which means it is not prepared for failure (no HA support).
|
||||
In addition, it is not designed to handle many connections reading/writing data
|
||||
concurrently.
|
||||
|
||||
pgAdmin added support for storing configurations in an external database to
|
||||
prevent this.
|
||||
|
||||
Added the 'CONFIG_DATABASE_URI' parameter in the :ref:`config.py <config_py>`
|
||||
file.
|
||||
|
||||
Use SQLite Database
|
||||
*******************
|
||||
|
||||
To use SQLite Database, make sure CONFIG_DATABASE_URI is empty string, such as
|
||||
''.
|
||||
|
||||
Use External Database
|
||||
*********************
|
||||
|
||||
If you want to use an external database, make sure the CONFIG_DATABASE_URI
|
||||
format is "dialect+driver://username:password@host:port/database".
|
||||
|
||||
**Note** It is recommended to create the database in advance.
|
||||
|
||||
Use PostgreSQL Database
|
||||
***********************
|
||||
|
||||
Following are the formats to use PostgreSQL as an external database.
|
||||
|
||||
Basic syntax:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
postgresql://username:password@host:port/database
|
||||
|
||||
Using specific schema (It is recommended to create the schema in advance):
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
postgresql://username:password@host:port/database?options=-csearch_path=<schema name>
|
||||
|
||||
Using default pgpass path for the service account:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
postgresql://username@host:port?options=-csearch_path=<schema name>
|
||||
|
||||
Specifying pgpass file path:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
postgresql://username@host:port?passfile=<path of the pgpass file>&options=-csearch_path=<schema name>
|
||||
@@ -16,6 +16,7 @@ of database objects.
|
||||
:maxdepth: 2
|
||||
|
||||
getting_started
|
||||
external_database
|
||||
connecting
|
||||
managing_cluster_objects
|
||||
managing_database_objects
|
||||
@@ -31,4 +32,4 @@ of database objects.
|
||||
|
||||
.. note:: Postgres, PostgreSQL and the Slonik Logo are trademarks or
|
||||
registered trademarks of the `PostgreSQL Community Association of Canada
|
||||
<https://www.postgres.ca/>`_, and used with their permission.
|
||||
<https://www.postgres.ca/>`_, and used with their permission.
|
||||
|
||||
@@ -11,8 +11,8 @@ passwords. This is applicable only for desktop mode users.
|
||||
the first time after starting the application.
|
||||
* Once you set the master password, all the existing saved passwords will be
|
||||
re-encrypted using the master password.
|
||||
* The server passwords which are saved in the SQLite DB file are encrypted and
|
||||
decrypted using the master password.
|
||||
* The server passwords which are saved in the SQLite DB file or External
|
||||
Database are encrypted and decrypted using the master password.
|
||||
|
||||
.. image:: images/master_password_set.png
|
||||
:alt: Set master password
|
||||
|
||||
@@ -11,6 +11,7 @@ notes for it.
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
release_notes_6_16
|
||||
release_notes_6_15
|
||||
release_notes_6_14
|
||||
release_notes_6_13
|
||||
|
||||
26
docs/en_US/release_notes_6_16.rst
Normal file
26
docs/en_US/release_notes_6_16.rst
Normal file
@@ -0,0 +1,26 @@
|
||||
************
|
||||
Version 6.16
|
||||
************
|
||||
|
||||
Release date: 2022-11-17
|
||||
|
||||
This release contains a number of bug fixes and new features since the release of pgAdmin 4 v6.15.
|
||||
|
||||
Supported Database Servers
|
||||
**************************
|
||||
**PostgreSQL**: 10, 11, 12, 13, 14 and 15
|
||||
|
||||
**EDB Advanced Server**: 10, 11, 12, 13, 14 and 15
|
||||
|
||||
New features
|
||||
************
|
||||
|
||||
| `Issue #1832 <https://github.com/pgadmin-org/pgadmin4/issues/1832>`_ - Added support for storing configurations of pgAdmin in an external database.
|
||||
|
||||
Housekeeping
|
||||
************
|
||||
|
||||
|
||||
Bug fixes
|
||||
*********
|
||||
|
||||
@@ -26,7 +26,9 @@ When Administrator itself gets locked, following steps may be considered to rest
|
||||
|
||||
OR
|
||||
|
||||
By updating SQLite DB (pgAdmin4.db):
|
||||
By updating configuration database
|
||||
|
||||
SQLite DB (pgAdmin4.db):
|
||||
|
||||
* Locate the pgAdmin4.db file and open it using any DB Browser (or DB Browser for SQLite)
|
||||
* After opening the DB file, head towards 'Execute SQL' section.
|
||||
@@ -34,6 +36,13 @@ By updating SQLite DB (pgAdmin4.db):
|
||||
|
||||
*UPDATE USER SET LOCKED = false, LOGIN_ATTEMPTS = 0 WHERE USERNAME = <YOUR_EMAIL_ID>*
|
||||
|
||||
External database:
|
||||
|
||||
* Connect to the database.
|
||||
* Run below query -
|
||||
|
||||
*UPDATE USER SET LOCKED = false, LOGIN_ATTEMPTS = 0 WHERE USERNAME = <YOUR_EMAIL_ID>*
|
||||
|
||||
* Make sure the query changes are committed.
|
||||
|
||||
Account locking by failed login attempts:
|
||||
@@ -47,4 +56,4 @@ exceeded.
|
||||
|
||||
MAX_LOGIN_ATTEMPTS is defaulted to 3 unsuccessful login attempts, after which the account would be locked.
|
||||
|
||||
The only way to restore the user account is by contacting the Administrator and ask to unlock it.
|
||||
The only way to restore the user account is by contacting the Administrator and ask to unlock it.
|
||||
|
||||
Reference in New Issue
Block a user