This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
wiki:advanced:multi-node:x2goserver-pgsql [2013/03/12 20:39] sunweaver |
wiki:advanced:multi-node:x2goserver-pgsql [2013/09/23 19:20] sunweaver |
||
---|---|---|---|
Line 116: | Line 116: | ||
After that step users of the posix group '' | After that step users of the posix group '' | ||
+ | |||
+ | ===== Database Structure and Troubleshooting ===== | ||
+ | |||
+ | In case it becomes necessary to edit the X2Go session database on the PostgreSQL server by hand, connect to the DB with this command: | ||
+ | |||
+ | ==== Connect to the database ==== | ||
+ | |||
+ | < | ||
+ | $ psql --user x2godbuser --password -h localhost --dbname x2go_sessions | ||
+ | </ | ||
+ | |||
+ | As password use the password found in ''/ | ||
+ | |||
+ | |||
+ | After successful login, the '' | ||
+ | |||
+ | < | ||
+ | ts-01:~ # psql --user x2godbuser --password -h localhost --dbname x2go_sessions | ||
+ | Password for user x2godbuser: < | ||
+ | Welcome to psql < | ||
+ | |||
+ | Type: \copyright for distribution terms | ||
+ | \h for help with SQL commands | ||
+ | \? for help with psql commands | ||
+ | \g or terminate with semicolon to execute query | ||
+ | \q to quit | ||
+ | |||
+ | x2go_sessions=> | ||
+ | </ | ||
+ | |||
+ | ==== Database structure ==== | ||
+ | |||
+ | The database has five tables: | ||
+ | |||
+ | < | ||
+ | x2go_sessions=> | ||
+ | List of relations | ||
+ | | ||
+ | --------+---------------+-------+---------- | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | (5 rows) | ||
+ | </ | ||
+ | |||
+ | Three of them are important for session management: sessions, used_ports, mounts. | ||
+ | |||
+ | Furthermore, | ||
+ | |||
+ | < | ||
+ | x2go_sessions=> | ||
+ | List of relations | ||
+ | | ||
+ | --------+---------------+------+---------- | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | (4 rows) | ||
+ | |||
+ | x2go_sessions=> | ||
+ | </ | ||
+ | |||
+ | If you want to show the content of a table or view, evoke this SQL command: | ||
+ | |||
+ | < | ||
+ | x2go_sessions=> | ||
+ | server | ||
+ | --------------+---------------------------------------+-----------------+------- | ||
+ | ts-01 | mike-57-1379961697_stRTERMINAL_dp24 | x2gouser_mike | 30019 | ||
+ | ts-01 | mike-57-1379961697_stRTERMINAL_dp24 | x2gouser_mike | 30018 | ||
+ | ts-01 | mike-57-1379961697_stRTERMINAL_dp24 | x2gouser_mike | 30020 | ||
+ | (3 rows) | ||
+ | </ | ||
+ | |||
+ | ==== Troubleshooting ==== | ||
+ | |||
+ | If you want to remove these entries (because they are there but they by some reason should not be there), use this command set: | ||
+ | |||
+ | < | ||
+ | x2go_sessions=> | ||
+ | DELETE 1 | ||
+ | </ | ||
+ | |||
+ | ... or ... | ||
+ | |||
+ | < | ||
+ | x2go_sessions=> | ||
+ | DELETE 3 | ||
+ | </ | ||
+ | |||
+ | For further input on manipulating PostgreSQL database via the '' | ||