In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).
We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.
TODO
* Add better support for non-ascii characters in the database name on
windows with Python 3
* Improve the messages created after the background processes by
different modules (such as Backup, Restore, Import/Export, etc.),
which does not show short-paths, and xml representable characters for
non-ascii characters, when found in the database objects, and the file
PATH.
Fixes#2174, #1797, #2166, #1940
Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
Turns out using the config file isn't a good idea if users copy config.py to config_local.py, as it prevents upgrades to the database. This has the added side-effect of simplifying future changes, as you only need to edit 2 files to modify the config DB now, not 3.
slower system - user may need to set the value to some higher value.
This value decide - for how long SQLITE operation will wait, before
throwing an operation timeout error because of the locked database.
Fixes#1329
A distro can now install a config_distro.py file alongside config.py
in which distro-specific configuration settings can be set, overriding
those in config.py. User settings in config_local.py will override
all other settings. This is useful to allow packagers to config
settings like the doc path, that may be specific to RPMs or Wheels
etc.
inaccessible.
In stand (without threaded) mode, flask application is not able to
process more than one request at a time. Hence - even the client
(browser) send multiple request, when connecting the server (which is
inaccessible), rest of operations get blocked, as making the connection
with the database server is blocking operation.
In order to fix the issue, we're starting the application with thread
support, in which it will create a separate thread of each request.
We will be using the external utilities like pg_dump, pg_dumpall,
pg_restore in background. pgAdmin 4 can be run as a CGI script, hence -
it is not good idea to run those utility in a controlled environment.
The process executor will run them in background, and we will execute
the process executor in detached mode.
Now that - the process executor runs in detached mode, we need an
observer, which will look at the status of the processes. It also reads
output, and error logs on demand.
Thanks - Surinder for helping in some of the UI changes.
selection, creation, upload/download files/directories resides on the
server side.
This will be useful for file selection/creation for different server
side utilites like pg_dump, pg_dumpall, pg_restore.
While accessing the configuration database from multiple session, it
results in to the error - OperationError, because - sqlite locks all the
database, and does not allow to access it simultaneously. We added the
timeout to give some time window for accessing it simultaneously.