Skip to content

Commit abeaf7d

Browse files
EDB Clone Schema: updates
1 parent eebf99b commit abeaf7d

File tree

7 files changed

+26
-7
lines changed

7 files changed

+26
-7
lines changed

product_docs/docs/epas/15/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,4 @@ The following limitations apply:
8181
- For remote cloning, if an object in the source schema depends on an extension, then you must create this extension in the public schema of the remote database before invoking the remote cloning function.
8282
- At most, 16 copy jobs can run in parallel to clone schemas. Each job can have at most 16 worker processes to copy table data in parallel.
8383
- You can't cancel queries run by background workers.
84+
- Non-blocking cloning functions such as `localcopyschema_nb` and `remotecopyschema_nb` must be performed by a superuser. Only blocking cloning functions like `localcopyschema` and `remotecopyschema` can be performed by a non-superuser. Although these functions don't enforce the superuser requirement, using them as a non-superuser can lead to unexpected behavior.

product_docs/docs/epas/15/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Install the EDB Clone Schema on any database to be used as the source or target
104104
1. Install the extensions. Make sure that you create the `parallel_clone` extension before creating the `edb_cloneschema` extension.
105105

106106
```sql
107-
CREATE EXTENSION parallel_clone SCHEMA public;
107+
CREATE EXTENSION parallel_clone;
108108

109109
CREATE EXTENSION edb_cloneschema;
110110
```

product_docs/docs/epas/16/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ Create the following extensions:
128128
CREATE EXTENSION postgres_fdw;
129129
CREATE EXTENSION dblink;
130130
CREATE EXTENSION adminpack;
131-
CREATE EXTENSION pgAgent;
131+
CREATE EXTENSION edb_job_scheduler;
132+
CREATE EXTENSION dbms_job;
132133
CREATE EXTENSION parallel_clone;
133134
CREATE EXTENSION edb_cloneschema;
134135
__OUTPUT__
@@ -239,7 +240,8 @@ Create the following extensions:
239240
CREATE EXTENSION postgres_fdw;
240241
CREATE EXTENSION dblink;
241242
CREATE EXTENSION adminpack;
242-
CREATE EXTENSION pgAgent;
243+
CREATE EXTENSION edb_job_scheduler;
244+
CREATE EXTENSION dbms_job;
243245
CREATE EXTENSION parallel_clone;
244246
CREATE EXTENSION edb_cloneschema;
245247
__OUTPUT__

product_docs/docs/epas/16/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@ Verify the following conditions before using an EDB Clone Schema function:
1818
- When using the remote copy functions, if the `on_tblspace` parameter is set to `true`, then the target database cluster contains all tablespaces that are referenced by objects in the source schema. Otherwise, creating the DDL statements for those database objects fails in the target schema, which causes a failure of the cloning process.
1919
- When using the remote copy functions, if you set the `copy_acls` parameter to `true`, then all roles that have `GRANT` privileges on objects in the source schema exist in the target database cluster. Otherwise granting privileges to those roles fails in the target schema, which causes a failure of the cloning process.
2020
- pgAgent is running against the target database if you're using the non-blocking form of the function.
21+
- Add the name of the database where you want to install or use the clone schema in the postgresql.conf file. For example, if you want to install or use the clone schema on the `edb` database, then add the following entry in the postgresql.conf file:
22+
23+
```
24+
edb_job_scheduler.database_list='edb'
25+
```
26+
27+
Also, add `parallel_clone` and `edb_job_scheduler` to the shared libraries in the postgresql.conf file:
28+
29+
```
30+
shared_preload_libraries='....,$libdir/parallel_clone, $libdir/edb_job_scheduler'
31+
```
32+
33+
Restart the database server to load the changes in postgresql.conf file.
2134

2235
EDB Postgres Advanced Server includes pgAgent as a component. For information about pgAgent, see the [pgAdmin documentation](https://www.pgadmin.org/docs/pgadmin4/dev/pgagent.html).
2336

@@ -81,3 +94,4 @@ The following limitations apply:
8194
- For remote cloning, if an object in the source schema depends on an extension, then you must create this extension in the public schema of the remote database before invoking the remote cloning function.
8295
- At most, 16 copy jobs can run in parallel to clone schemas. Each job can have at most 16 worker processes to copy table data in parallel.
8396
- You can't cancel queries run by background workers.
97+
- Non-blocking cloning functions such as `localcopyschema_nb` and `remotecopyschema_nb` must be performed by a superuser. Only blocking cloning functions like `localcopyschema` and `remotecopyschema` can be performed by a non-superuser. Although these functions don't enforce the superuser requirement, using them as a non-superuser can lead to unexpected behavior.

product_docs/docs/epas/16/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Perform this installation on any database to be used as the source or target dat
2020
CREATE EXTENSION postgres_fdw SCHEMA public;
2121
CREATE EXTENSION dblink SCHEMA public;
2222
CREATE EXTENSION adminpack;
23-
CREATE EXTENSION pgagent;
23+
CREATE EXTENSION edb_job_scheduler;
24+
CREATE EXTENSION dbms_job;
2425
```
2526

2627
For more information about using the `CREATE EXTENSION` command, see the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/static/sql-createextension.html).
@@ -30,7 +31,7 @@ Perform this installation on any database to be used as the source or target dat
3031
Modify the `postgresql.conf` file by adding `$libdir/parallel_clone` to the `shared_preload_libraries` configuration parameter:
3132

3233
```ini
33-
shared_preload_libraries = '$libdir/dbms_pipe,$libdir/dbms_aq,$libdir/parallel_clone'
34+
shared_preload_libraries = '$libdir/dbms_pipe,$libdir/dbms_aq,$libdir/parallel_clone,$libdir/edb_job_scheduler'
3435
```
3536
To load the libraries with clone schema support, restart the database server.
3637

@@ -103,7 +104,7 @@ Install the EDB Clone Schema on any database to be used as the source or target
103104
1. Install the extensions. Make sure that you create the `parallel_clone` extension before creating the `edb_cloneschema` extension.
104105

105106
```sql
106-
CREATE EXTENSION parallel_clone SCHEMA public;
107+
CREATE EXTENSION parallel_clone;
107108

108109
CREATE EXTENSION edb_cloneschema;
109110
```

product_docs/docs/epas/17/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ The following limitations apply:
8787
- For remote cloning, if an object in the source schema depends on an extension, then you must create this extension in the public schema of the remote database before invoking the remote cloning function.
8888
- At most, 16 copy jobs can run in parallel to clone schemas. Each job can have at most 16 worker processes to copy table data in parallel.
8989
- You can't cancel queries run by background workers.
90+
- Non-blocking cloning functions such as `localcopyschema_nb` and `remotecopyschema_nb` must be performed by a superuser. Only blocking cloning functions like `localcopyschema` and `remotecopyschema` can be performed by a non-superuser. Although these functions don't enforce the superuser requirement, using them as a non-superuser can lead to unexpected behavior.

product_docs/docs/epas/17/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Install the EDB Clone Schema on any database to be used as the source or target
103103
1. Install the extensions. Make sure that you create the `parallel_clone` extension before creating the `edb_cloneschema` extension.
104104

105105
```sql
106-
CREATE EXTENSION parallel_clone SCHEMA public;
106+
CREATE EXTENSION parallel_clone;
107107

108108
CREATE EXTENSION edb_cloneschema;
109109
```

0 commit comments

Comments
 (0)