Re: pgAdmin 4 v6.1 Released

2021-10-21 Thread Khushboo Vashi
Hi Paul,

On Fri, Oct 22, 2021 at 5:12 AM Paul Lockaby  wrote:

> Hi Akshay, I want to really thank you and Khushboo Vashi for this new
> feature to authenticate via REMOTE_USER.
>
> However, it's clear from the functionality that it only addresses working
> with pgAdmin when it is embedded inside uWSGI or mod_wsgi, and that's OK :)
>
> To make it work with headers that come from another server, I added these
> lines to my config_local.py file:
>
>
>
> # monkey patch the authentication class to use headers instead of
> environments
> from flask import request
> import pgadmin.authenticate.webserver
>
> def get_user(self):
> username = request.headers.get("X-Forwarded-User")
> if not username or username == "(null)":
> username
> return username
>
> pgadmin.authenticate.webserver.WebserverAuthentication.get_user =
> get_user
>
> Thanks for the patch.
We will add this patch in the webserver authentication plugin with some
modifications, so other users can use it.

Thanks,
Khushboo

>
> I wanted to share this with the list, too, in case someone else wants to
> add this functionality to their system. Thanks a ton!
>
> -Paul
>
>
>
>
>
> Paul Lockaby (he/him) / Senior Data Engineer
> Center for an Informed Public / University of Washinton
> plock...@uw.edu / www.cip.uw.edu
>
>
> On Oct 21, 2021, at 5:44 AM, Akshay Joshi 
> wrote:
>
> The pgAdmin Development Team is pleased to announce pgAdmin 4 version 6.1.
>
>
> This release of pgAdmin 4 includes 30 bug fixes and new features. For
> more details please see the release notes at:
>
>
> https://www.pgadmin.org/docs/pgadmin4/6.1/release_notes_6_1.html.
>
>
> pgAdmin is the leading Open Source graphical management tool for
> PostgreSQL. For more information, please see:
>
>
> https://www.pgadmin.org/
>
>
> Notable changes in this release include:
>
> Features:
>
>- Added support for indent guides in the browser tree.
>- Added support for advanced table fields like the foreign key, the
>primary key in the ERD tool.
>- Added support to allow tables to be dragged to the ERD Tool.
>- Added index creation when generating SQL in the ERD tool.
>- Added support for authentication via the web server (REMOTE_USER).
>- Added support to enable/disable rules.
>
>
>
> Bugs/Housekeeping:
>
>- Fixed OAuth2 integration redirect issue.
>- Ensure that the query highlighting color in the query tool should be
>less intensive.
>- Fixed an issue where the browser tree doesn't show all contents on
>changing resolution.
>- Ensure that columns should be displayed in the order of creation
>instead of alphabetical order in the browser tree.
>- Fixed background color issue in the browser tree.
>- Added support for composite foreign keys in the ERD tool.
>- Fixed an issue where the users are unable to load the databases
>behind an HTTP reverse proxy.
>- Fixed an issue where each click to refresh the collection node, the
>number of objects decreasing by tens or more.
>- Fixed browser tree sort order regression issue.
>-
>
>Fixed an issue where the blank string is stored instead of NULL in the
>server table of an SQLite database.
>
>
> Builds for Windows and macOS are available now, along with a Python Wheel,
> Docker Container, RPM, DEB Package, and source code tarball from:
> https://www.pgadmin.org/download/
> --
> Akshay Joshi
>
> pgAdmin Project
>
>
>


Re: pgAdmin 4 v6.1 Released

2021-10-21 Thread Paul Lockaby
Hi Akshay, I want to really thank you and Khushboo Vashi for this new feature 
to authenticate via REMOTE_USER.

However, it's clear from the functionality that it only addresses working with 
pgAdmin when it is embedded inside uWSGI or mod_wsgi, and that's OK :)

To make it work with headers that come from another server, I added these lines 
to my config_local.py file:



# monkey patch the authentication class to use headers instead of 
environments
from flask import request
import pgadmin.authenticate.webserver

def get_user(self):
username = request.headers.get("X-Forwarded-User")
if not username or username == "(null)":
username
return username

pgadmin.authenticate.webserver.WebserverAuthentication.get_user = get_user


I wanted to share this with the list, too, in case someone else wants to add 
this functionality to their system. Thanks a ton!

-Paul





Paul Lockaby (he/him) / Senior Data Engineer
Center for an Informed Public / University of Washinton
plock...@uw.edu / www.cip.uw.edu


On Oct 21, 2021, at 5:44 AM, Akshay Joshi 
mailto:akshay.jo...@enterprisedb.com>> wrote:

The pgAdmin Development Team is pleased to announce pgAdmin 4 version 6.1.



This release of pgAdmin 4 includes 30 bug fixes and new features. For more 
details please see the release notes at:



https://www.pgadmin.org/docs/pgadmin4/6.1/release_notes_6_1.html.



pgAdmin is the leading Open Source graphical management tool for PostgreSQL. 
For more information, please see:



https://www.pgadmin.org/



Notable changes in this release include:

Features:

  *
Added support for indent guides in the browser tree.
  *
Added support for advanced table fields like the foreign key, the primary key 
in the ERD tool.
  *
Added support to allow tables to be dragged to the ERD Tool.
  *
Added index creation when generating SQL in the ERD tool.
  *
Added support for authentication via the web server (REMOTE_USER).
  *
Added support to enable/disable rules.



Bugs/Housekeeping:

  *
Fixed OAuth2 integration redirect issue.
  *
Ensure that the query highlighting color in the query tool should be less 
intensive.
  *
Fixed an issue where the browser tree doesn't show all contents on changing 
resolution.
  *
Ensure that columns should be displayed in the order of creation instead of 
alphabetical order in the browser tree.
  *
Fixed background color issue in the browser tree.
  *
Added support for composite foreign keys in the ERD tool.
  *
Fixed an issue where the users are unable to load the databases behind an HTTP 
reverse proxy.
  *
Fixed an issue where each click to refresh the collection node, the number of 
objects decreasing by tens or more.
  *
Fixed browser tree sort order regression issue.
  *   Fixed an issue where the blank string is stored instead of NULL in the 
server table of an SQLite database.



Builds for Windows and macOS are available now, along with a Python Wheel,
Docker Container, RPM, DEB Package, and source code tarball from:
https://www.pgadmin.org/download/
--
Akshay Joshi

pgAdmin Project




Re: Problem related to volume creation to pgadmin 4 Docker image

2021-10-21 Thread Rodrigo Mariano

Hi Dave,

Which OS do you use? I'm using Ubuntu 18.

Nautilus is the file manager to Ubuntu.

I updated my image to dpage/pgadmin4:6.0 in order to avoid old versions. 
I add a new volume and I executed the chown command (i.e. sudo chown -R 
5050:5050 ).


I tried to add my user to 5050 group, but it did not work, because when 
pgadmin4 Docker container is executed, it allows just 5050 user to edit 
the folder and not other ones from the same group (i.e. *drwx--*).


*drwx--* is the default permission that pgadmin4 Docker container 
gives to volume it creates, in other words, just 5050 user can edit the 
volume data, not other ones, even if that user belongs to 5050 group.


Thank you.

Best regards,
Rodrigo

On 21/10/2021 10:20, Dave Page wrote:



On Thu, Oct 21, 2021 at 1:33 PM Rodrigo Mariano 
mailto:rodmarian...@gmail.com>> wrote:


Hi Dave,

/> I've never needed to do that with plain Docker or Kubernetes.
I've never used Docker Compose though. /

Have you ever tried to create a volume to
//var/lib/pgadmin/storage/ folder using newer image versions and
you were able to access it via host in the nautilus? Using plain
Docker.

I have no idea what "the nautilus" is, but yes, I've mapped 
/var/lib/pgadmin to the host many times (including 30 seconds ago with 
6.1), and it works fine. As long as appropriate permissions are set on 
the directory on the host, I can access it from there as well.



If you have, how could I do that?

As you suggested, you could add yourself to the 5050 group, and ensure 
the directory on the host is group readable.



I did not have this kind of issue with older versions of pgadmin4
Docker image (e.g. /dpage/pgadmin4:4.15/), this issue has started
with recent images that I need to change folder permission to
5050:5050 (e.g. /dpage/pgadmin4:5.4/).

4.15 is very old. We've long since had additional checks in pgAdmin to 
ensure that we can successfully write to the storage directory, and to 
stop running the processes in the container as root that was a) quite 
dangerous and b) could allow it to override permissions on the host. 
In particular, you're probably hitting the issue mentioned in the 
callout box at the top of 
https://www.pgadmin.org/docs/pgadmin4/6.1/release_notes_4_16.html 




Thank you.

Best regards,
Rodrigo


On 21/10/2021 08:36, Dave Page wrote:



On Thu, Oct 21, 2021 at 12:27 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi Aditya,

According to the documentation, I need to change user and
group of my host folder to /5050:5050/ through /chown/.

If my default user and group is /rodrigo:rodrigo/, how could
my default user access a folder that belongs to another one
(i.e. /5050:5050/)?

The pgAdmin processes in the container run under uid 5050, gid 5050.


As far as I know, I cannot access a folder that belongs to
other user normally.

Maybe should I add my default user (i.e. /rodrigo/) to
pgadmin group (i.e. /5050/)?

I've never needed to do that with plain Docker or Kubernetes.
I've never used Docker Compose though.

If I should, I believe this information could be written on
the documentation.

Thank you.

Best regards,
Rodrigo

On 21/10/2021 02:06, Aditya Toshniwal wrote:

Hi Rodrigo,

pgAdmin just needs a readable and writable directory.
pgAdmin cannot change any permission on its own. It might be
some other ownership issue on your system then.

On Wed, Oct 20, 2021 at 11:29 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi Aditya,

I did both.

First, I changed the folder permissions to 5050:5050 and
the Docker container worked, but I was not able to get
into the folder; the folder is locked and I cannot
access its subfolders, even through terminal. For example:

After that, I tried using default permissions, however
that error message appeared.

Thank you.

Best regards,
Rodrigo

On 20/10/2021 10:08, Aditya Toshniwal wrote:

Hi Rodrigo,

Did you run sudo chown -R 5050:5050 ./volumes/pgadmin4
and sudo chown -R 5050:5050 ./volumes/pgadmin4_storage
As per -

https://www.pgadmin.org/docs/pgadmin4/6.0/container_deployment.html#mapped-files-and-directories


?


On Wed, Oct 20, 2021 at 6:14 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi Aditya,

I tried to create the volume to sub directory as
well 

Re: Problem related to volume creation to pgadmin 4 Docker image

2021-10-21 Thread Dave Page
On Thu, Oct 21, 2021 at 1:33 PM Rodrigo Mariano 
wrote:

> Hi Dave,
>
> *> I've never needed to do that with plain Docker or Kubernetes. I've
> never used Docker Compose though. *
>
> Have you ever tried to create a volume to */var/lib/pgadmin/storage*
> folder using newer image versions and you were able to access it via host
> in the nautilus? Using plain Docker.
>
I have no idea what "the nautilus" is, but yes, I've mapped
/var/lib/pgadmin to the host many times (including 30 seconds ago with
6.1), and it works fine. As long as appropriate permissions are set on the
directory on the host, I can access it from there as well.

>
> If you have, how could I do that?
>
As you suggested, you could add yourself to the 5050 group, and ensure the
directory on the host is group readable.

>
> I did not have this kind of issue with older versions of pgadmin4 Docker
> image (e.g. *dpage/pgadmin4:4.15*), this issue has started with recent
> images that I need to change folder permission to 5050:5050 (e.g.
> *dpage/pgadmin4:5.4*).
>
4.15 is very old. We've long since had additional checks in pgAdmin to
ensure that we can successfully write to the storage directory, and to stop
running the processes in the container as root that was a) quite dangerous
and b) could allow it to override permissions on the host. In particular,
you're probably hitting the issue mentioned in the callout box at the top
of https://www.pgadmin.org/docs/pgadmin4/6.1/release_notes_4_16.html


>
> Thank you.
>
> Best regards,
> Rodrigo
>
> On 21/10/2021 08:36, Dave Page wrote:
>
>
>
> On Thu, Oct 21, 2021 at 12:27 PM Rodrigo Mariano 
> wrote:
>
>> Hi Aditya,
>>
>> According to the documentation, I need to change user and group of my
>> host folder to *5050:5050* through *chown*.
>>
>> If my default user and group is *rodrigo:rodrigo*, how could my default
>> user access a folder that belongs to another one (i.e. *5050:5050*)?
>>
> The pgAdmin processes in the container run under uid 5050, gid 5050.
>
>>
>> As far as I know, I cannot access a folder that belongs to other user
>> normally.
>>
>> Maybe should I add my default user (i.e. *rodrigo*) to pgadmin group
>> (i.e. *5050*)?
>>
> I've never needed to do that with plain Docker or Kubernetes. I've never
> used Docker Compose though.
>
>> If I should, I believe this information could be written on the
>> documentation.
>>
>> Thank you.
>>
>> Best regards,
>> Rodrigo
>> On 21/10/2021 02:06, Aditya Toshniwal wrote:
>>
>> Hi Rodrigo,
>>
>> pgAdmin just needs a readable and writable directory. pgAdmin cannot
>> change any permission on its own. It might be some other ownership issue on
>> your system then.
>>
>> On Wed, Oct 20, 2021 at 11:29 PM Rodrigo Mariano 
>> wrote:
>>
>>> Hi Aditya,
>>>
>>> I did both.
>>>
>>> First, I changed the folder permissions to 5050:5050 and the Docker
>>> container worked, but I was not able to get into the folder; the folder is
>>> locked and I cannot access its subfolders, even through terminal. For
>>> example:
>>>
>>> After that, I tried using default permissions, however that error
>>> message appeared.
>>>
>>> Thank you.
>>>
>>> Best regards,
>>> Rodrigo
>>> On 20/10/2021 10:08, Aditya Toshniwal wrote:
>>>
>>> Hi Rodrigo,
>>>
>>> Did you run sudo chown -R 5050:5050 ./volumes/pgadmin4 and sudo chown -R
>>> 5050:5050 ./volumes/pgadmin4_storage As per -
>>> https://www.pgadmin.org/docs/pgadmin4/6.0/container_deployment.html#mapped-files-and-directories
>>> ?
>>>
>>>
>>> On Wed, Oct 20, 2021 at 6:14 PM Rodrigo Mariano 
>>> wrote:
>>>
 Hi Aditya,

 I tried to create the volume to sub directory as well (i.e. 
 */var/lib/pgadmin/storage/postgres_localhost.com
 *), but the same error message appears.

 I send below the traceback.

 Thank you for your help.

 Best regards,
 Rodrigo

 -

 Traceback (most recent call last):
   File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line
 589, in spawn_worker
 worker.init_process()
   File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py",
 line 92, in init_process
 super().init_process()
   File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
 line 134, in init_process
 self.load_wsgi()
   File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
 line 146, in load_wsgi
 self.wsgi = self.app.wsgi()
   File "/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line
 67, in wsgi
 self.callable = self.load()
   File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
 line 58, in load
 return self.load_wsgiapp()
   File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
 line 48, in load_wsgiapp
 return util.import_app(self.app_uri)
   File "/venv/lib/python3.8/site-packages/gunicorn/util.py", line 359,
 in import_app
 mod = 

pgAdmin 4 v6.1 Released

2021-10-21 Thread Akshay Joshi
The pgAdmin Development Team is pleased to announce pgAdmin 4 version 6.1.



This release of pgAdmin 4 includes 30 bug fixes and new features. For more
details please see the release notes at:



https://www.pgadmin.org/docs/pgadmin4/6.1/release_notes_6_1.html.



pgAdmin is the leading Open Source graphical management tool for
PostgreSQL. For more information, please see:



https://www.pgadmin.org/



Notable changes in this release include:

Features:

   -

   Added support for indent guides in the browser tree.
   -

   Added support for advanced table fields like the foreign key, the
   primary key in the ERD tool.
   -

   Added support to allow tables to be dragged to the ERD Tool.
   -

   Added index creation when generating SQL in the ERD tool.
   -

   Added support for authentication via the web server (REMOTE_USER).
   -

   Added support to enable/disable rules.



Bugs/Housekeeping:

   -

   Fixed OAuth2 integration redirect issue.
   -

   Ensure that the query highlighting color in the query tool should be
   less intensive.
   -

   Fixed an issue where the browser tree doesn't show all contents on
   changing resolution.
   -

   Ensure that columns should be displayed in the order of creation instead
   of alphabetical order in the browser tree.
   -

   Fixed background color issue in the browser tree.
   -

   Added support for composite foreign keys in the ERD tool.
   -

   Fixed an issue where the users are unable to load the databases behind
   an HTTP reverse proxy.
   -

   Fixed an issue where each click to refresh the collection node, the
   number of objects decreasing by tens or more.
   -

   Fixed browser tree sort order regression issue.
   -

   Fixed an issue where the blank string is stored instead of NULL in the
   server table of an SQLite database.



Builds for Windows and macOS are available now, along with a Python Wheel,

Docker Container, RPM, DEB Package, and source code tarball from:

https://www.pgadmin.org/download/

--

Akshay Joshi

pgAdmin Project


Re: Problem related to volume creation to pgadmin 4 Docker image

2021-10-21 Thread Rodrigo Mariano

Hi Dave,

/> I've never needed to do that with plain Docker or Kubernetes. I've 
never used Docker Compose though. /


Have you ever tried to create a volume to //var/lib/pgadmin/storage/ 
folder using newer image versions and you were able to access it via 
host in the nautilus? Using plain Docker.


If you have, how could I do that?

I did not have this kind of issue with older versions of pgadmin4 Docker 
image (e.g. /dpage/pgadmin4:4.15/), this issue has started with recent 
images that I need to change folder permission to 5050:5050 (e.g. 
/dpage/pgadmin4:5.4/).


Thank you.

Best regards,
Rodrigo


On 21/10/2021 08:36, Dave Page wrote:



On Thu, Oct 21, 2021 at 12:27 PM Rodrigo Mariano 
mailto:rodmarian...@gmail.com>> wrote:


Hi Aditya,

According to the documentation, I need to change user and group of
my host folder to /5050:5050/ through /chown/.

If my default user and group is /rodrigo:rodrigo/, how could my
default user access a folder that belongs to another one (i.e.
/5050:5050/)?

The pgAdmin processes in the container run under uid 5050, gid 5050.


As far as I know, I cannot access a folder that belongs to other
user normally.

Maybe should I add my default user (i.e. /rodrigo/) to pgadmin
group (i.e. /5050/)?

I've never needed to do that with plain Docker or Kubernetes. I've 
never used Docker Compose though.


If I should, I believe this information could be written on the
documentation.

Thank you.

Best regards,
Rodrigo

On 21/10/2021 02:06, Aditya Toshniwal wrote:

Hi Rodrigo,

pgAdmin just needs a readable and writable directory. pgAdmin
cannot change any permission on its own. It might be some
other ownership issue on your system then.

On Wed, Oct 20, 2021 at 11:29 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi Aditya,

I did both.

First, I changed the folder permissions to 5050:5050 and the
Docker container worked, but I was not able to get into the
folder; the folder is locked and I cannot access its
subfolders, even through terminal. For example:

After that, I tried using default permissions, however that
error message appeared.

Thank you.

Best regards,
Rodrigo

On 20/10/2021 10:08, Aditya Toshniwal wrote:

Hi Rodrigo,

Did you run sudo chown -R 5050:5050 ./volumes/pgadmin4 and
sudo chown -R 5050:5050 ./volumes/pgadmin4_storage As per -

https://www.pgadmin.org/docs/pgadmin4/6.0/container_deployment.html#mapped-files-and-directories


?


On Wed, Oct 20, 2021 at 6:14 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi Aditya,

I tried to create the volume to sub directory as well
(i.e. //var/lib/pgadmin/storage/postgres_localhost.com
/), but the same error
message appears.

I send below the traceback.

Thank you for your help.

Best regards,
Rodrigo

-

Traceback (most recent call last):
  File
"/venv/lib/python3.8/site-packages/gunicorn/arbiter.py",
line 589, in spawn_worker
    worker.init_process()
  File
"/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py",
line 92, in init_process
    super().init_process()
  File
"/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
line 134, in init_process
    self.load_wsgi()
  File
"/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File
"/venv/lib/python3.8/site-packages/gunicorn/app/base.py",
line 67, in wsgi
    self.callable = self.load()
  File
"/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
line 58, in load
    return self.load_wsgiapp()
  File
"/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File
"/venv/lib/python3.8/site-packages/gunicorn/util.py",
line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.8/importlib/__init__.py", line
127, in import_module
    return _bootstrap._gcd_import(name[level:], package,
level)
  File "", line 1014, in
_gcd_import
  File "", line 991, in
_find_and_load
  File "", 

Re: Problem related to volume creation to pgadmin 4 Docker image

2021-10-21 Thread Aditya Toshniwal
Hi,

On Thu, Oct 21, 2021 at 4:57 PM Rodrigo Mariano 
wrote:

> Hi Aditya,
>
> According to the documentation, I need to change user and group of my host
> folder to *5050:5050* through *chown*.
>
> If my default user and group is *rodrigo:rodrigo*, how could my default
> user access a folder that belongs to another one (i.e. *5050:5050*)?
>
> As far as I know, I cannot access a folder that belongs to other user
> normally.
>
> Maybe should I add my default user (i.e. *rodrigo*) to pgadmin group
> (i.e. *5050*)?
>
That might work.

> If I should, I believe this information could be written on the
> documentation.
>
Dave, should we add this in docs ?

>
> Thank you.
>
> Best regards,
> Rodrigo
> On 21/10/2021 02:06, Aditya Toshniwal wrote:
>
> Hi Rodrigo,
>
> pgAdmin just needs a readable and writable directory. pgAdmin cannot
> change any permission on its own. It might be some other ownership issue on
> your system then.
>
> On Wed, Oct 20, 2021 at 11:29 PM Rodrigo Mariano 
> wrote:
>
>> Hi Aditya,
>>
>> I did both.
>>
>> First, I changed the folder permissions to 5050:5050 and the Docker
>> container worked, but I was not able to get into the folder; the folder is
>> locked and I cannot access its subfolders, even through terminal. For
>> example:
>>
>> After that, I tried using default permissions, however that error message
>> appeared.
>>
>> Thank you.
>>
>> Best regards,
>> Rodrigo
>> On 20/10/2021 10:08, Aditya Toshniwal wrote:
>>
>> Hi Rodrigo,
>>
>> Did you run sudo chown -R 5050:5050 ./volumes/pgadmin4 and sudo chown -R
>> 5050:5050 ./volumes/pgadmin4_storage As per -
>> https://www.pgadmin.org/docs/pgadmin4/6.0/container_deployment.html#mapped-files-and-directories
>> ?
>>
>>
>> On Wed, Oct 20, 2021 at 6:14 PM Rodrigo Mariano 
>> wrote:
>>
>>> Hi Aditya,
>>>
>>> I tried to create the volume to sub directory as well (i.e. 
>>> */var/lib/pgadmin/storage/postgres_localhost.com
>>> *), but the same error message appears.
>>>
>>> I send below the traceback.
>>>
>>> Thank you for your help.
>>>
>>> Best regards,
>>> Rodrigo
>>>
>>> -
>>>
>>> Traceback (most recent call last):
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line
>>> 589, in spawn_worker
>>> worker.init_process()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py",
>>> line 92, in init_process
>>> super().init_process()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
>>> line 134, in init_process
>>> self.load_wsgi()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
>>> line 146, in load_wsgi
>>> self.wsgi = self.app.wsgi()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line
>>> 67, in wsgi
>>> self.callable = self.load()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line
>>> 58, in load
>>> return self.load_wsgiapp()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line
>>> 48, in load_wsgiapp
>>> return util.import_app(self.app_uri)
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/util.py", line 359,
>>> in import_app
>>> mod = importlib.import_module(module)
>>>   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
>>> import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>   File "", line 1014, in _gcd_import
>>>   File "", line 991, in _find_and_load
>>>   File "", line 975, in
>>> _find_and_load_unlocked
>>>   File "", line 671, in _load_unlocked
>>>   File "", line 848, in exec_module
>>>   File "", line 219, in
>>> _call_with_frames_removed
>>>   File "/pgadmin4/run_pgadmin.py", line 4, in 
>>> from pgAdmin4 import app
>>>   File "/pgadmin4/pgAdmin4.py", line 98, in 
>>> app = create_app()
>>>   File "/pgadmin4/pgadmin/__init__.py", line 441, in create_app
>>> paths.init_app(app)
>>>   File "/pgadmin4/pgadmin/utils/paths.py", line 103, in init_app
>>> raise InternalServerError(
>>> werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The
>>> user does not have permission to read and write to the specified storage
>>> directory.
>>> On 20/10/2021 09:08, Aditya Toshniwal wrote:
>>>
>>> Hi Rodrigo,
>>>
>>> /var/lib/pgadmin/storage is the base directory. A sub directory for each
>>> user will be created for storing user files.
>>>
>>> On Wed, Oct 20, 2021 at 5:10 PM Rodrigo Mariano 
>>> wrote:
>>>
 Hi,

 I'm having a trouble related to pgadmin 4 Docker image
 
 .

 I would like to create a volume to */var/lib/pgadmin/storage* folder,
 in order to access backup files created by pgadmin 4 interface, however
 error messages about permission denied are raised, for example:

 werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The
 user does not have permission to read and write to the specified 

Re: Problem related to volume creation to pgadmin 4 Docker image

2021-10-21 Thread Dave Page
On Thu, Oct 21, 2021 at 12:27 PM Rodrigo Mariano 
wrote:

> Hi Aditya,
>
> According to the documentation, I need to change user and group of my host
> folder to *5050:5050* through *chown*.
>
> If my default user and group is *rodrigo:rodrigo*, how could my default
> user access a folder that belongs to another one (i.e. *5050:5050*)?
>
The pgAdmin processes in the container run under uid 5050, gid 5050.

>
> As far as I know, I cannot access a folder that belongs to other user
> normally.
>
> Maybe should I add my default user (i.e. *rodrigo*) to pgadmin group
> (i.e. *5050*)?
>
I've never needed to do that with plain Docker or Kubernetes. I've never
used Docker Compose though.

> If I should, I believe this information could be written on the
> documentation.
>
> Thank you.
>
> Best regards,
> Rodrigo
> On 21/10/2021 02:06, Aditya Toshniwal wrote:
>
> Hi Rodrigo,
>
> pgAdmin just needs a readable and writable directory. pgAdmin cannot
> change any permission on its own. It might be some other ownership issue on
> your system then.
>
> On Wed, Oct 20, 2021 at 11:29 PM Rodrigo Mariano 
> wrote:
>
>> Hi Aditya,
>>
>> I did both.
>>
>> First, I changed the folder permissions to 5050:5050 and the Docker
>> container worked, but I was not able to get into the folder; the folder is
>> locked and I cannot access its subfolders, even through terminal. For
>> example:
>>
>> After that, I tried using default permissions, however that error message
>> appeared.
>>
>> Thank you.
>>
>> Best regards,
>> Rodrigo
>> On 20/10/2021 10:08, Aditya Toshniwal wrote:
>>
>> Hi Rodrigo,
>>
>> Did you run sudo chown -R 5050:5050 ./volumes/pgadmin4 and sudo chown -R
>> 5050:5050 ./volumes/pgadmin4_storage As per -
>> https://www.pgadmin.org/docs/pgadmin4/6.0/container_deployment.html#mapped-files-and-directories
>> ?
>>
>>
>> On Wed, Oct 20, 2021 at 6:14 PM Rodrigo Mariano 
>> wrote:
>>
>>> Hi Aditya,
>>>
>>> I tried to create the volume to sub directory as well (i.e. 
>>> */var/lib/pgadmin/storage/postgres_localhost.com
>>> *), but the same error message appears.
>>>
>>> I send below the traceback.
>>>
>>> Thank you for your help.
>>>
>>> Best regards,
>>> Rodrigo
>>>
>>> -
>>>
>>> Traceback (most recent call last):
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line
>>> 589, in spawn_worker
>>> worker.init_process()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py",
>>> line 92, in init_process
>>> super().init_process()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
>>> line 134, in init_process
>>> self.load_wsgi()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
>>> line 146, in load_wsgi
>>> self.wsgi = self.app.wsgi()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line
>>> 67, in wsgi
>>> self.callable = self.load()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line
>>> 58, in load
>>> return self.load_wsgiapp()
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line
>>> 48, in load_wsgiapp
>>> return util.import_app(self.app_uri)
>>>   File "/venv/lib/python3.8/site-packages/gunicorn/util.py", line 359,
>>> in import_app
>>> mod = importlib.import_module(module)
>>>   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in
>>> import_module
>>> return _bootstrap._gcd_import(name[level:], package, level)
>>>   File "", line 1014, in _gcd_import
>>>   File "", line 991, in _find_and_load
>>>   File "", line 975, in
>>> _find_and_load_unlocked
>>>   File "", line 671, in _load_unlocked
>>>   File "", line 848, in exec_module
>>>   File "", line 219, in
>>> _call_with_frames_removed
>>>   File "/pgadmin4/run_pgadmin.py", line 4, in 
>>> from pgAdmin4 import app
>>>   File "/pgadmin4/pgAdmin4.py", line 98, in 
>>> app = create_app()
>>>   File "/pgadmin4/pgadmin/__init__.py", line 441, in create_app
>>> paths.init_app(app)
>>>   File "/pgadmin4/pgadmin/utils/paths.py", line 103, in init_app
>>> raise InternalServerError(
>>> werkzeug.exceptions.InternalServerError: 500 Internal Server Error: The
>>> user does not have permission to read and write to the specified storage
>>> directory.
>>> On 20/10/2021 09:08, Aditya Toshniwal wrote:
>>>
>>> Hi Rodrigo,
>>>
>>> /var/lib/pgadmin/storage is the base directory. A sub directory for each
>>> user will be created for storing user files.
>>>
>>> On Wed, Oct 20, 2021 at 5:10 PM Rodrigo Mariano 
>>> wrote:
>>>
 Hi,

 I'm having a trouble related to pgadmin 4 Docker image
 
 .

 I would like to create a volume to */var/lib/pgadmin/storage* folder,
 in order to access backup files created by pgadmin 4 interface, however
 error messages about permission denied are raised, for example:

 

Re: Problem related to volume creation to pgadmin 4 Docker image

2021-10-21 Thread Rodrigo Mariano

Hi Aditya,

According to the documentation, I need to change user and group of my 
host folder to /5050:5050/ through /chown/.


If my default user and group is /rodrigo:rodrigo/, how could my default 
user access a folder that belongs to another one (i.e. /5050:5050/)?


As far as I know, I cannot access a folder that belongs to other user 
normally.


Maybe should I add my default user (i.e. /rodrigo/) to pgadmin group 
(i.e. /5050/)?
If I should, I believe this information could be written on the 
documentation.


Thank you.

Best regards,
Rodrigo

On 21/10/2021 02:06, Aditya Toshniwal wrote:

Hi Rodrigo,

pgAdmin just needs a readable and writable directory. pgAdmin cannot 
change any permission on its own. It might be some 
other ownership issue on your system then.


On Wed, Oct 20, 2021 at 11:29 PM Rodrigo Mariano 
mailto:rodmarian...@gmail.com>> wrote:


Hi Aditya,

I did both.

First, I changed the folder permissions to 5050:5050 and the
Docker container worked, but I was not able to get into the
folder; the folder is locked and I cannot access its subfolders,
even through terminal. For example:

After that, I tried using default permissions, however that error
message appeared.

Thank you.

Best regards,
Rodrigo

On 20/10/2021 10:08, Aditya Toshniwal wrote:

Hi Rodrigo,

Did you run sudo chown -R 5050:5050 ./volumes/pgadmin4 and sudo
chown -R 5050:5050 ./volumes/pgadmin4_storage As per -

https://www.pgadmin.org/docs/pgadmin4/6.0/container_deployment.html#mapped-files-and-directories


?


On Wed, Oct 20, 2021 at 6:14 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi Aditya,

I tried to create the volume to sub directory as well (i.e.
//var/lib/pgadmin/storage/postgres_localhost.com
/), but the same error message
appears.

I send below the traceback.

Thank you for your help.

Best regards,
Rodrigo

-

Traceback (most recent call last):
  File
"/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line
589, in spawn_worker
    worker.init_process()
  File
"/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py",
line 92, in init_process
    super().init_process()
  File
"/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
line 134, in init_process
    self.load_wsgi()
  File
"/venv/lib/python3.8/site-packages/gunicorn/workers/base.py",
line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
  File
"/venv/lib/python3.8/site-packages/gunicorn/app/base.py",
line 67, in wsgi
    self.callable = self.load()
  File
"/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
line 58, in load
    return self.load_wsgiapp()
  File
"/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py",
line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/venv/lib/python3.8/site-packages/gunicorn/util.py",
line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127,
in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1014, in _gcd_import
  File "", line 991, in
_find_and_load
  File "", line 975, in
_find_and_load_unlocked
  File "", line 671, in
_load_unlocked
  File "", line 848, in
exec_module
  File "", line 219, in
_call_with_frames_removed
  File "/pgadmin4/run_pgadmin.py", line 4, in 
    from pgAdmin4 import app
  File "/pgadmin4/pgAdmin4.py", line 98, in 
    app = create_app()
  File "/pgadmin4/pgadmin/__init__.py", line 441, in create_app
    paths.init_app(app)
  File "/pgadmin4/pgadmin/utils/paths.py", line 103, in init_app
    raise InternalServerError(
werkzeug.exceptions.InternalServerError: 500 Internal Server
Error: The user does not have permission to read and write to
the specified storage directory.

On 20/10/2021 09:08, Aditya Toshniwal wrote:

Hi Rodrigo,

/var/lib/pgadmin/storage is the base directory. A sub
directory for each user will be created for storing user files.

On Wed, Oct 20, 2021 at 5:10 PM Rodrigo Mariano
mailto:rodmarian...@gmail.com>> wrote:

Hi,

I'm having a trouble related to pgadmin 4 Docker image

.

   

Re: PG ADMIN V 6 ERD Diagram

2021-10-21 Thread Aditya Toshniwal
Hi Sachin,

Please share the screenshots. pgerd file can be used only in pgAdmin ERD
tool.

On Thu, Oct 21, 2021 at 12:57 PM Sachin Kumar 
wrote:

> Hi Aditya,
>
> I found the ERD it goes extreme down the Page and saved it in  ERD.pgerd.
> now how to open this Pgerd Extention in excel or any other tool. there are
> 100 tables and the size is too small how to make it larger in size.
>
> On Thu, Oct 21, 2021 at 12:14 PM Sachin Kumar 
> wrote:
>
>> HI Aditya,
>>
>> The EDG comes for a flash of a second and goes off. let me know if TODAY
>> we can have a google meet session to show you on the remote.
>>
>> Let me know a time when u want to meet on remote session
>>
>> Regards
>> Sachin
>>
>> On Tue, Oct 19, 2021 at 5:39 PM Aditya Toshniwal <
>> aditya.toshni...@enterprisedb.com> wrote:
>>
>>> Hi Sachin,
>>>
>>> Can you please share the screenshot ? And if you can share a sample DB
>>> to reproduce the issue then that would be great.
>>>
>>> On Tue, Oct 19, 2021 at 5:14 PM Sachin Kumar 
>>> wrote:
>>>
 Hi Experts,

 I am using PG Admin Version 6.0, Application Mode Desktop. i am trying
 to generate ERD using right-click option in DB but it is not showing
 anything once a blank is showing after processing. Kindly help with the
 documentation if any to solve this issue and how to export this ERD into
 excel or save this ERD.

 --

 Best Regards,
 Sachin Kumar

>>>
>>>
>>> --
>>> Thanks,
>>> Aditya Toshniwal
>>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>>> 
>>> "Don't Complain about Heat, Plant a TREE"
>>>
>>
>>
>> --
>>
>> Best Regards,
>> Sachin Kumar
>>
>
>
> --
>
> Best Regards,
> Sachin Kumar
>


-- 
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Software Architect | *edbpostgres.com*

"Don't Complain about Heat, Plant a TREE"


Re: PG ADMIN V 6 ERD Diagram

2021-10-21 Thread Sachin Kumar
Hi Aditya,

I found the ERD it goes extreme down the Page and saved it in  ERD.pgerd.
now how to open this Pgerd Extention in excel or any other tool. there are
100 tables and the size is too small how to make it larger in size.

On Thu, Oct 21, 2021 at 12:14 PM Sachin Kumar 
wrote:

> HI Aditya,
>
> The EDG comes for a flash of a second and goes off. let me know if TODAY
> we can have a google meet session to show you on the remote.
>
> Let me know a time when u want to meet on remote session
>
> Regards
> Sachin
>
> On Tue, Oct 19, 2021 at 5:39 PM Aditya Toshniwal <
> aditya.toshni...@enterprisedb.com> wrote:
>
>> Hi Sachin,
>>
>> Can you please share the screenshot ? And if you can share a sample DB to
>> reproduce the issue then that would be great.
>>
>> On Tue, Oct 19, 2021 at 5:14 PM Sachin Kumar 
>> wrote:
>>
>>> Hi Experts,
>>>
>>> I am using PG Admin Version 6.0, Application Mode Desktop. i am trying
>>> to generate ERD using right-click option in DB but it is not showing
>>> anything once a blank is showing after processing. Kindly help with the
>>> documentation if any to solve this issue and how to export this ERD into
>>> excel or save this ERD.
>>>
>>> --
>>>
>>> Best Regards,
>>> Sachin Kumar
>>>
>>
>>
>> --
>> Thanks,
>> Aditya Toshniwal
>> pgAdmin Hacker | Software Architect | *edbpostgres.com*
>> 
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
>
> Best Regards,
> Sachin Kumar
>


-- 

Best Regards,
Sachin Kumar