Skip to content

Commit

Permalink
removed pgAgent references and updated the version to 17.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhibhammar committed Nov 22, 2024
1 parent 1d4b6d8 commit b55ee4d
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 122 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The PSQL client invokes the `select_emp` function on which a global breakpoint w

```sql
$ psql edb enterprisedb
psql.bin (17.1.0, server 17.1.0)
psql.bin (17.2.0, server 17.2.0)
Type "help" for help.

edb=# SELECT select_emp(7900);
Expand All @@ -96,7 +96,7 @@ You can now debug the program using the operations like step into, step over, an

```sql
$ psql edb enterprisedb
psql.bin (17.1.0, server 17.1.0)
psql.bin (17.2.0, server 17.2.0)
Type "help" for help.

edb=# SELECT select_emp(7900);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ __OUTPUT__
version
-----------------------------------------------------------------------------------------------
------------------------------------------------
PostgreSQL 17.1 (EnterpriseDB Advanced Server 17.1.0 (Debian 17.1.0-1.bullseye)) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
PostgreSQL 17.1 (EnterpriseDB Advanced Server 17.2.0 (Debian 17.2.0-1.bullseye)) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
(1 row)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ In case two clone schema jobs are running in parallel, the first log file has `0

<div id="remotecopyschema_nb" class="registered_link"></div>

The `remotecopyschema_nb` function copies a schema and its database objects from a source schema in the remote source database specified in the `source_fdw` foreign server to a target schema in the local target database specified in the `target_fdw` foreign server. Copying occurs in a non-blocking manner as a job submitted to pgAgent.
The `remotecopyschema_nb` function copies a schema and its database objects from a source schema in the remote source database specified in the `source_fdw` foreign server to a target schema in the local target database specified in the `target_fdw` foreign server. Copying occurs in a non-blocking manner as a job submitted to DBMS_JOB.

```sql
remotecopyschema_nb(
Expand All @@ -229,11 +229,11 @@ remotecopyschema_nb(
)
```

The function returns an `INTEGER` value job ID for the job submitted to pgAgent. If the function fails, then null is returned.
The function returns an `INTEGER` value job ID for the job submitted to DBMS_JOB. If the function fails, then null is returned.

The `source_fdw`, `target_fdw`, `source`, `target`, and `log_filename` parameters are required. All other parameters are optional.

After the pgAgent job is complete, remove it with the `remove_log_file_and_job` function.
After the job is complete, remove it with the `remove_log_file_and_job` function.

### Parameters

Expand Down Expand Up @@ -283,12 +283,6 @@ Number of background workers to perform the clone in parallel. The default value

The same cloning operation is performed as the example in [`remotecopyschema`](#remotecopyschema) but using the non-blocking function `remotecopyschema_nb`.

This command starts pgAgent on the target database `tgtdb`. The `pgagent` program file is located in the `bin` subdirectory of the EDB Postgres Advanced Server installation directory.

```shell
[root@localhost bin]# ./pgagent -l 1 -s /tmp/pgagent_tgtdb_log hostaddr=127.0.0.1 port=5444
user=enterprisedb dbname=tgtdb password=password
```
### Results

The `remotecopyschema_nb` function returns the job ID shown as `2` in the example:
Expand All @@ -314,7 +308,7 @@ __OUTPUT__
(1 row)
```

The following command removes the log file and the pgAgent job:
The following command removes the log file and the job:

```sql
tgtdb=# SELECT edb_util.remove_log_file_and_job ('clone_rmt_src_tgt',2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ __OUTPUT__

<div id="localcopyschema_nb" class="registered_link"></div>

The `localcopyschema_nb` function copies a schema and its database objects in a local database specified in the `source_fdw` foreign server from the source schema to the specified target schema in the same database. The copy occurs in a non-blocking manner as a job submitted to pgAgent.
The `localcopyschema_nb` function copies a schema and its database objects in a local database specified in the `source_fdw` foreign server from the source schema to the specified target schema in the same database. The copy occurs in a non-blocking manner as a job submitted to DBMS_JOB.

```sql
localcopyschema_nb(
Expand All @@ -210,11 +210,11 @@ localcopyschema_nb(
)
```

The function returns an `INTEGER` value job ID for the job submitted to pgAgent. If the function fails, then null is returned.
The function returns an `INTEGER` value job ID for the job submitted to DBMS_JOB. If the function fails, then null is returned.

The `source_fdw`, `source`, `target`, and `log_filename` parameters are required. All other parameters are optional.

After the pgAgent job completes, remove it with the `remove_log_file_and_job` function.
After the job completes, remove it with the `remove_log_file_and_job` function.

### Parameters

Expand Down Expand Up @@ -254,25 +254,6 @@ Number of background workers to perform the clone in parallel. The default value

The same cloning operation is performed as the example in [`localcopyschema`](#localcopyschema) but using the non-blocking function `localcopyschema_nb`.

You can use this command to see whether pgAgent is running on the appropriate local database:

```shell
[root@localhost ~]# ps -ef | grep pgagent
root 4518 1 0 11:35 pts/1 00:00:00 pgagent -s /tmp/pgagent_edb_log
hostaddr=127.0.0.1 port=5444 dbname=edb user=enterprisedb password=password
root 4525 4399 0 11:35 pts/1 00:00:00 grep --color=auto pgagent
```

If pgAgent isn't running, start it by executing the `pgagent` option. The `pgagent` program file is located in the `bin` subdirectory of the EDB Postgres Advanced Server installation directory.

```shell
[root@localhost bin]# ./pgagent -l 2 -s /tmp/pgagent_edb_log hostaddr=127.0.0.1 port=5444
dbname=edb user=enterprisedb password=password
```

!!! Note
The `pgagent -l 2` option starts pgAgent in `DEBUG` mode, which logs continuous debugging information into the log file specified with the `-s` option. Use a lower value for the `-l` option, or omit it entirely to record less information.

The `localcopyschema_nb` function returns the job ID shown as `4` in the example.

```sql
Expand All @@ -295,7 +276,7 @@ __OUTPUT__
(1 row)
```

The following removes the pgAgent job:
The following removes the log file and the job:

```sql
edb=# SELECT edb_util.remove_log_file_and_job (4);
Expand Down
19 changes: 0 additions & 19 deletions product_docs/docs/epas/17/epas_rel_notes/epas16_6_0_rel_notes.mdx

This file was deleted.

Loading

0 comments on commit b55ee4d

Please sign in to comment.