You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/en/02_quick_start.md
+78-17Lines changed: 78 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,7 @@ Download the PgManage distribution file for your platform from the [Command Prom
8
8
9
9
### Linux
10
10
11
-
PgManage for Linux is packaged in `.AppImage` format and does not require installation.
12
-
Download PgManage .AppImage file, in the command line change to the directory containing the downloaded file, make it executable, and run it:
11
+
PgManage for Linux is packaged in `.AppImage` format and does not require installation. Download PgManage's `.AppImage` file. Then, in the command line, change to the directory containing the downloaded file, make it executable, and run it:
Run the PgManage setup executable and follow the installation instructions.
20
+
- Run the PgManage setup executable and follow the installation instructions.
21
+
- To install PostgreSQL client utilities, follow the steps in the [Installing Client Utilities on Windows](#installing-client-utilities-on-windows) section.
22
22
23
23
### Mac
24
24
25
25
Download the `DMG` file and double click on it and drag the PgManage icon to the `Applications Folder` icon.
26
26
27
-
### Oracle Support
27
+
**FIXME:** add PostgreSQL command line tools installation instructions
28
28
29
-
A note about extra dependencies for Oracle support.
29
+
---
30
+
31
+
### PostgreSQL Client
32
+
33
+
When PgManage starts, it will try to automatically find PostgreSQL's client executable files for the `pg_dump`, `pg_restore`, `pg_dumpall`, and `psql` commands. For cases in which this autodiscovery does not work or is not desired, a path to the binaries may be specified on the application’s `Utilities Menu → Settings`.
34
+
35
+

36
+
37
+
To check that the binaries were found, you may click the `validate` button which will display the installed PostgreSQL’s version.
38
+
39
+

40
+
41
+
> **Note:** The autodiscovery of client binaries is not available on Windows. The only way to use the backup and restore features is to manually install the PostgreSQL client utilities.
42
+
43
+
#### Installing Client Utilities on Windows
44
+
45
+
- You may download a Windows’ PostgreSQL installer from [enterprisedb.com](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads).
46
+
- Take note of the installation path where the components will be installed.
47
+
48
+

49
+
50
+
- The installer will ask what components to install. Only install the `command line tools`.
51
+
52
+

53
+
54
+
- Finally, add the path to the binaries in the PgManage’s `Utilities Menu → Settings`. Notice that the binary files are inside the `bin` folder.
55
+
56
+

57
+
58
+
#### Installing Client Utilities on Linux:
59
+
60
+
Setting up paths to PostgreSQL client binaries is not necessary for Linux systems because these will be automatically discovered in the $PATH environment variable. Still, there are some cases in which the path autodiscovery may fail:
61
+
62
+
- if multiple versions of the PostgreSQL client binaries are installed
63
+
64
+
- if the PostgreSQL client binaries are installed in a location not included in the $PATH environment variable
30
65
31
-
### Postgresql Client
32
-
While being self-contained application for the majority of features, pgmanage relies on postgresql command line tools to perform database backup and restore operations.
66
+
Once you have installed your preferred PostgreSQL’s version, add the path of the binaries in `Utilities Menu → Settings`.
33
67
34
-
TODO: add installation guide for various linux distros, windows and osx\
35
-
TODO: add note about extra dependencies for Oracle support.
68
+
> **Note:** You may install PostgreSQL for your particular Linux distribution on [postgresql.org](https://www.postgresql.org/download/linux/).
36
69
70
+
#### Installing Client Utilities on Mac
71
+
72
+
To install the client binaries in MacOS, there are two options: to install the complete Postgres packages or to only install libpq and then update the PATH.
73
+
74
+
To install the complete Postgres’s packages run the following command:
75
+
76
+
```
77
+
brew install postgresql@[Major version]
78
+
```
79
+
80
+
To install only the binaries and update the PATH variable, run the following commands:
Once you have installed your preferred Postgres version, add the path to the binaries in `Utilities Menu → Settings`.
88
+
89
+
> **Note:** For more information on how to install Postgres on Mac, refer to [Postgres' documentation](https://www.postgresql.org/download/macosx/).
90
+
91
+
---
92
+
93
+
### Oracle Support
94
+
95
+
A note about extra dependencies for Oracle support.
96
+
97
+
---
37
98
38
99
## Launching the App
39
100
40
101
When the application starts for the first time, it will prompt a message to set up a master password. Fill up the provided fields and press `Set master password`.
102
+
This password will be requested the next time you open the application but you may reset it with a `Reset Master Password` button.
41
103
42
-
This password will be requested the next time you open the application but you may reset it with a “Reset Master Password” button.
104
+
>**Note:** resetting the master password will erase all the information that was encrypted with it, including database connection credentials.
43
105
44
106

45
107
@@ -64,22 +126,21 @@ PgManage stores sensitive data, such as database access credentials and SSH keys
64
126
---
65
127
66
128
## Creating your first DB connection
129
+
67
130
Click on the ⚡ icon on the left sidebar, the connection management UI will be shown:
Connections and Connection Groups are shown on the left, clicking on the left panel items shows the item's view/edit form.
134
+
Connections and Connection Groups are shown on the left. Clicking on the left panel items shows the item’s view/edit form. Click on `➕ Add → Connection`. Set the connection title and database type; the rest of the form will change depending on the database type selected. Fill in the rest of the database connection properties.
71
135
72
-
Click the `➕ Add` button, select Connection
73
-
Set connection title and database type, the rest of the form will change depending on the database type selected.
74
-
Fill in the rest of database connection properties.
75
-
**Note:** Alternatively the connection string may be used to establish a database connection.
136
+
> **Note:** Alternatively, the connection string may be used to establish a database connection.
76
137
77
138
There are two special connection types, which behave differently:
78
139
79
140
-**SQLite connections** do not need any other settings besides the sqlite3 file path.
80
141
-**Terminal connections** are shell/console sessions with a remote host. These require setting SSH properties.
81
142
82
-
> **Note:** the password field is optional. If you leave it empty, the password prompt will be shown each time before establishing the connection. For PostgreSQL connections, PgManage will also try to retrieve the connection password from the `.pgpass` file, unless the connection properties are provided in connection string form.
143
+
> **Note:** the password field is optional. If you leave it empty, the password prompt will be shown each time before establishing the connection. For PostgreSQL connections, PgManage will also try to retrieve the connection password from the `.pgpass` file.
@@ -16,17 +16,38 @@ The **context menus** can be accessed by right-clicking on one of the tree nodes
16
16
17
17
The actions available depend on the selected database object. Here is a list of command actions on alphabetical order:
18
18
19
-
-**Alter/edit:** opens a query tab with a template to change the given object.
20
-
**TODO**: replace the above with a description of the new Table Editor functionality, same applies to "Create Table". The editor is available via Tables node->right click->Create Table OR by right clicking on the table node->table actions->alter table
19
+
-**Alter/edit:** opens a new tab with an interface to alter the given object. For example, a table may be altered by right-clicking on the table object and selecting `Table Actions → Alter Table`. From there, you may do the following:
20
+
- Change a field by double-clicking
21
+
- Add a column with the `Add Column` button
22
+
- Remove a column with the `❌ icon` at the end of each row
23
+
- Check the generated query under the `Generated SQL`
24
+
- Execute the generated query with the `Apply Changes` button.
-**Analyze Table:** opens a query tab with a template for the [ANALYZE](https://www.postgresql.org/docs/current/sql-analyze.html) action.
23
-
-**Create:** opens a query tab with a template to create the given object.
29
+
-**Create:** opens a new tab with an interface to create the given object. For example, a table may be created by right-clicking on the `Tables` object and selecting `Create Table`. From here you may do the following:
30
+
- change the table name
31
+
- change the assigned schema
32
+
- edit the columns by double-clicking on the fields
33
+
- add a column with the `Add Column` button
34
+
- remove a column with the `❌ icon` at the end of each line.
35
+
- move a given column up or down with the arrows at the end of each line
36
+
- check the generated query under the `Generated SQL` field.
37
+
- execute the generated query with the `Apply Changes` button.
-**Drop/Delete:** deletes the selected object from the server.
25
42
-**Monitoring:** the dashboard or the backends may be selected to be opened on a new tab.
26
43
-**Refresh:** refreshes the selected object.
27
44
-**Reindex:** opens a query tab with a template for the [REINDEX](https://www.postgresql.org/docs/current/sql-reindex.html) action.
28
-
-**Render Graph:** creates the graph of tables inside the database. It can generate a simple graph or a complete graph.
29
-
**TODO**: ^^^ this feature was replaced with ER Diagram menu item.
45
+
-**Render Graph:** opens a tab with an Entity Relationship diagram. This feature is available by right-clicking one of the schema objects and selecting `ER Diagram`. From there, you may:
46
+
- move the tables by clicking and dragging
47
+
- click on the name of a foreign key to highlight the table's relation with another.
48
+
49
+

50
+
30
51
-**Server Configuration:** opens the Server Configuration settings tab.
31
52
-**Truncate Table:** opens a query tab with a template for the [TRUNCATE](https://www.postgresql.org/docs/current/sql-truncate.html) action.
32
53
-**Update Records:** opens a query tab with a template for the [UPDATE](https://www.postgresql.org/docs/current/sql-update.html) action.
@@ -148,28 +169,50 @@ One may return to a previous configuration snapshot by selecting the snapshot fr
148
169
149
170
## PostgreSQL Extension Management
150
171
151
-
PostgreSQL Extensions can be managed via dedicated dialog accessible by right clicking Extensions node and its subnodes in the DB Object Tree
152
-
**TODO**: Add detailed documentation and screenshot
172
+
PostgreSQL Extensions can be managed via the dedicated dialog accessible by right-clicking the `Extensions` node and its subnodes in the DB Object Tree.
173
+
174
+
When the `Extensions` node is right-clicked, the following menu will be displayed:
175
+
176
+

177
+
178
+
By clicking `Create Extension UI` a menu will open with a user interface, allowing to enter the extension name, a comment, a schema, and a version. A preview of the created query will be displayed under "Preview":
Right-clicking on a given extension will display a menu with the following options:
183
+
184
+
-**Alter Extension UI:** The `Alter Extension UI` option will open a user interface to create an `ALTER EXTENSION` query. This displays the following fields: the name of the extension, a comment, the schema, the version, and the query's preview.
-**Alter Extension:** Displays a template on a new tap with an `ALTER EXTENSION` query.
189
+
190
+
-**Edit Comment:** Displays a template on a new tap with a `COMMENT ON EXTENSION` query.
191
+
192
+
-**Drop Extension UI:** The `Drop Extension UI` will open a prompt confirming if the given extension should be dropped. Cascading can be enabled if desired.
-**Drop Extension:** Displays a template on a new tap with a `DROP EXTENSION` query.
153
197
154
198
---
155
199
156
200
## Data Editor Grid
157
-
**TODO**: document the new Data Editor tab here, remove old data editor instructions below.
158
201
159
202
The data editor grid allows editing data of a specified query in a visual format. This feature can be accessed by right-clicking on a table in the DB entity tree.
160
203
161
204

162
205
163
-
Then, a new tab will be created with a default query of `select * from mytable t`. A text editor allows to add further conditions to the query.
206
+
Then, a new tab will be created with the data editor. By default, the first 10 rows of the `SELECT * from [table] ORDER BY t.id` query will be displayed. A text field allows to change the query's conditions.
164
207
165
-

208
+

166
209
167
210
The data editor grid allows the following changes:
168
-
-**Delete a row:** Click on the `❌ icon`and the selected rows will become red.
169
-
-**Edit cells:** Doubleclick on a data cell to edit the grid. Or, `right-click → Edit Content` to open a separate editor.
170
-
-**Displayed rows:** Click on the `Query Rows` dropdown-menu and select the number of desired rows.
211
+
-**Delete a row:** Click on the `❌ icon`next to a row and it will become red. You may deselect the row with the going back icon next to the row.
212
+
-**Edit cells:** Double-click on a data cell to edit the grid.
213
+
-**Displayed rows:** Click on the `Limit` dropdownmenu and select the number of desired rows.
171
214
172
-
Once the desired changes are done, click on the `Save` button.
215
+
Once the desired changes are done, click on the `Apply changes` button.
173
216
174
217
---
175
218
@@ -209,7 +252,18 @@ The different backup/restore jobs will be displayed under the `Jobs` section. He
209
252
Under the `Actions` column, you may view details about a specific job or delete the job. The information about the job will contain the executed command, the start time, the duration of execution, and the output.
210
253
211
254
> **Note:** The backup and restore features run in the background, allowing you to navigate outside of the current tab without pausing the process.
212
-
**TODO**: add note about the new PIGZ compression support and how to configure it (in app settings dialog)
255
+
256
+
### PIGZ Support
257
+
PIGZ compression is now available for Linux. If desired, PIGZ needs to be installed on the target OS. For example, in Ubuntu, you may install it as follows:
258
+
259
+
```
260
+
sudo apt update -y
261
+
sudo apt install -y pigz
262
+
```
263
+
Next, the path to the PIGZ binaries needs to be specified in PgManage. If PIGZ is installed, the path may be added in the `Utilities Menu → Settings → Options → Pigz Binary Path`.
264
+
265
+

266
+
213
267
### Backup
214
268
215
269
PgManage allows you to create backups for a database or the whole server. The database backups can be `custom`, `.tar`, `plain`, or `directory`. The only format supported for server backups is `plain`.
@@ -235,6 +289,47 @@ Once the general information is filled out the `Revert Settings`, `Preview`, and
235
289
-**Restore:** executes the restore commands as indicated in the form.
236
290
237
291
---
238
-
### Extras
292
+
## pg_cron GUI Instructions
293
+
294
+
First, install pg_cron in your target OS. For example, in Ubuntu, you may install it as follows:
Next, add pg_cron to `shared_preload_libraries` in postgresql.conf. To do this change the following parameter:
301
+
302
+
```
303
+
shared_preload_libraries = 'pg_cron'
304
+
```
305
+
306
+
> **Note:** to get the path to your postgresql.conf file you may run the following query: `SHOW config_file;` To get the path to your pg_hba.conf file run the following query: `SHOW hba_file;`
307
+
308
+
Restart the postgres service so that the changes in the configuration take effect:
Then, the pg_cron functions and metadata tables can be created. In the postgres shell run the following as super user:
315
+
316
+
```
317
+
CREATE EXTENSION pg_cron;
318
+
```
319
+
320
+
To ensure that pg_cron can start jobs, libpg needs permission to open a connection to the local database. This can be done by enabling `trust` authentication for connections coming from localhost. In your `pg_hba.conf` file, add the following line under "IPv4 local connections":
321
+
```
322
+
host all all 0.0.0.0/0 md5
323
+
```
324
+
325
+
Add the following line at the end of the `pg_hba.conf` file to allow connections from all hosts:
326
+
```
327
+
hostssl all all 0.0.0.0/0 md5
328
+
```
329
+
330
+
> **Note:** for more information on installing and setting up a cron extention, visit [pg_cron's GitHub repository](https://github.com/citusdata/pg_cron)
331
+
332
+
Now, PgManage should display the `jobs` node under the database node.
333
+
239
334
**TODO:** add detailed pg_cron GUI instructions
240
335
brief:install pg_cron extension via extension manager. the "jobs" node should appear under the database node. right click-> new job
0 commit comments