Friday, 15 April 2016

pgAdmin 4 - The elephant nears the finish line

As you may know, many of us from the pgAdmin team have been hard at work on pgAdmin 4 for some time now. pgAdmin 4 is a complete rewrite of pgAdmin (the fourth, as you may guess), the previous version having reached the end of it's maintainable life after 14 years of development.

Work on the project began slowly, almost two years ago, however the team at EnterpriseDB have ramped up the development pace over the last few months. Right now, we're approaching alpha-readiness which we expect to be at within a few weeks.


This new application is designed for operation on both the desktop and a webserver. Written in Python using the Flask framework for the backend, and Javascript/jQuery/Backbone for the frontend, it can easily be deployed as a WSGI application for multiple users in practically any network environment. A small runtime application allows it to be run as a desktop application - this is a Qt executable that incorporates a Python interpreter and web browser along with the main application in a single package that can be installed on a developer laptop as with previous versions of pgAdmin.


Whilst the core functionality of pgAdmin 4 remains similar to pgAdmin 3, there are a number of changes we've made:

  • Support for unsupported database versions has been dropped.
  • We haven't re-implemented support for some object types that no one really used in the tool before - for example, operator classes and families.
  • We haven't (yet) reimplemented some of the tools that didn't work so well in pgAdmin 3, such as the graphical query builder or database designer (which was always disabled entirely by default).
  • The Query Tool and Edit Grid have been merged into a single tool. Over coming releases we'll be improving the functionality further to allow in-grid updates to be made to results from arbitrary queries (where a query is determined to be updateable). For now though, updating is allowed when pgAdmin knows the data source is a single table with a primary key.
  • The user interface is more flexible than ever, allowing tabs to be docked and re-arranged in more ways than previously.
  • We've spent time redesigning some of the UI paradigms in pgAdmin 3. Gone are the list controls with Add/Remove buttons, replaced with what we call sub-node grid controls that will allow in-grid editing of key values, with more detail available when needed in expandable rows.
  • We also spend time thinking about how to make it faster to use pgAdmin, by minimising the need to switch between dialogues, using searchable combo boxes and more.
  • The UI is much more attractive, making use of control groupings and expandable regions to make things more readable.


So, enough of the babble, here are some pre-release, semi-polished screenshots:

The main user interface, showing the properties of a function. 

Setting the ACL on a function. 
Adding a member to a composite type using the sub-node grid control. 
The Query Tool and Data Editor.

The Procedural Language Debugger.


As you can imagine, there has been a significant amount of work done to get to this stage, and I really need to express my gratitude to those who have contributed, as well as the executive management team at EnterpriseDB who have allowed me to commit so many people to this project:

Project leadership
  • Ashesh Vashi (engineering team manager, code guru)
  • Karen Blatchley (project manager)

Development team
  • Khushboo Vashi
  • Akshay Joshi
  • Arun Kollan
  • Harshal Dhumal
  • Murtuza Zabuawala
  • Neel Patel
  • Sanket Mehta
  • Surinder Kumar

  • Muhammad Aqeel
  • Paresh More
  • Sandeep Thakkar

  • Priyanka Shendge
  • Fahar Abbas

Of course, there are also community members who are starting to contribute fixes and other improvements, such as Thom Brown (on his own time, not EDBs), Seçkin Alan, Ronan Dunklau and Prasad Somwanshi, all of whom (along with others I may have missed) deserve thanks.

Want to help or learn more?

If you want to help, you can checkout the code and start playing with it. We're not yet feature complete (for example, the Tables node in the treeview is still in development), but we're pretty close. Feel free to try out the code, and report or better yet, fix any bugs or issues you may find. If you wish to start working on new features that is also welcome, but please do email the hackers list first to ensure your work is not something that's already on our project plan!

If anyone would like to talk more about pgAdmin 4, I'll be at PGConf.US next week - the organisers know me well and should be able to help you find me for a chat or demo. See you there!


  1. Where should we reprot issues?

    trying to make it run, but i got errors with too long filename in the session.

    2016-04-15 13:31:47,820: ERROR werkzeug: Error on request:
    Traceback (most recent call last):
    File "/Users/myuser/pgadmin4/venv/lib/python2.7/site-packages/werkzeug/", line 177, in run_wsgi
    File "/Users/myuser/pgadmin4/venv/lib/python2.7/site-packages/werkzeug/", line 165, in execute
    application_iter = app(environ, start_response)
    File "/Users/myuser/pgadmin4/venv/lib/python2.7/site-packages/flask/", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
    File "/Users/myuser/pgadmin4/venv/lib/python2.7/site-packages/flask/", line 1813, in wsgi_app
    File "/Users/myuser/pgadmin4/venv/lib/python2.7/site-packages/flask/", line 321, in push
    self.session =
    File "/Users/myuser/pgadmin4/venv/lib/python2.7/site-packages/flask/", line 825, in open_session
    return self.session_interface.open_session(self, request)
    File "/Users/myuser/pgadmin4/web/pgadmin/utils/", line 209, in open_session
    return SqliteSessionStorage(, sid)
    File "/Users/myuser/pgadmin4/web/pgadmin/utils/", line 60, in __init__
    sess_db =, os.O_CREAT, int("600", 8))
    OSError: [Errno 63] File name too long: '/Users/myuser/.pgadmin/sessions/.eJxNkUtvozAUhf_KyOto....'

    1. Report issues to please. Thanks!

  2. I had no idea you guys were this close. Hats off...

  3. I thank you for the courtesy to thank.
    I hope in more contributions.

    1. Thanks for helping out - it's appreciated!

  4. Any chance you're going to build this in electron for desktop apps?

    1. No, we're using a Qt based runtime we've developed.

  5. Replies
    1. We certainly want it to, but I don't know if anyone has tried 3.5 yet, so there may be issues to be resolved. Bug reports or better yet patches are very welcome if you want to try it out. Thanks!

  6. Replies
    1. Yes! The code was committed last week :-)

  7. We have tried Python 3.4 (certainly - not Python 3.5)

  8. Hi dave I would like to translate this post into Spanish with your permission of course, you agree ?

    1. Please feel free to do so. Thanks.

  9. Very nice, keep up the good work! Hopefully pgAdmin 4 will be rolled out soon,

  10. Hello Dave, like leninmhs, would like to translate the publication for Portuguese-Brazil. I have your permission?

    My blog is

    Thank you in advance and congratulations.