diff --git a/README.md b/README.md index 287d48090fd..f808778e00c 100644 --- a/README.md +++ b/README.md @@ -383,3 +383,7 @@ Option 2: on GitHub 1. Edit a file on GitHub. 2. Submit changes as a PR on a new branch. + +### Style Guide for EDB contributors + +See [EDB documentation style guide](https://enterprisedb.atlassian.net/wiki/spaces/DCBC/pages/2387870239/Documentation+Style+Guide). \ No newline at end of file diff --git a/docs/agreements/doc-release-tag-format.md b/docs/agreements/doc-release-tag-format.md index 792562b972b..55c89eeb1b5 100644 --- a/docs/agreements/doc-release-tag-format.md +++ b/docs/agreements/doc-release-tag-format.md @@ -1,22 +1,22 @@ -| Product | Key | Tag | -|------------------------------|---------------------------------------------------------|------------------------------------| -| barman | barman | product/barman/*version* | -| Backup and Recovery Tool | bart | product/bart/*version* | -| BDR | bdr | product/bdr/*version* | -| Connectors | *name*-connector, where *name* is jdbc, net, odbc, or ocl | product/*name*-connector/*version* | -| EDB Cloud | edbcloud | product/edbcloud/*version* | -| EDB Postgres Advanced Server | epas | product/epas/*version* | -| Failover Manager | efm | product/efm/*version* | -| Foriegn Data Wrappers | *name*-fdw, where *name* is hadoop, mongo, or mysql | product/*name*-fdw/*version* | -| HARP | harp | product/harp/*version* | -| Migration Portal | mp | product/mp/*version* | -| Migration Toolkit | mtk | product/mtk/*version* | -| Postgres Enterprise Manager | pem | product/pem/*version* | -| pgBackrest | backrest | product/backrest/*version* | -| PgBouncer | pgbouncer | product/pgbouncer/*version* | +| Product | Key | Tag | PM/PO | +|------------------------------|---------------------------------------------------------|------------------------------------| ----- | +| barman | barman | product/barman/*version* | Adam Wright | +| Backup and Recovery Tool | bart | product/bart/*version* | Adam Wright, Robert Haas | +| BDR | bdr | product/bdr/*version* | John Dalton | +| Connectors | *name*-connector, where *name* is jdbc, net, odbc, or ocl | product/*name*-connector/*version* |Eric McCormack (JDBC), Zahid Khan (OCI, ODBC) | +| EDB Cloud | edbcloud | product/edbcloud/*version* | Aislinn Wright | +| EDB Postgres Advanced Server | epas | product/epas/*version* | Robert Haas | +| Failover Manager | efm | product/efm/*version* | John Dalton, Robert Bissett (Bobby) | +| Foriegn Data Wrappers | *name*-fdw, where *name* is hadoop, mongo, or mysql | product/*name*-fdw/*version* | Jeevan Chalke | +| HARP | harp | product/harp/*version* | John Dalton | +| Migration Portal | mp | product/mp/*version* | Prashant Argawal | +| Migration Toolkit | mtk | product/mtk/*version* | Prashant Argawal +| Postgres Enterprise Manager | pem | product/pem/*version* | Anthony Waite, Ashesh Vashi | +| pgBackrest | backrest | product/backrest/*version* | Adam Wright | +| PgBouncer | pgbouncer | product/pgbouncer/*version* | | | pgPool-II | pgpool | product/pgpool/*version* | | PostGIS | postgis | product/postgis/*version* | | PostgreSQL | pgsql | product/pgsql/*version* | -| Replication Manager | repmgr | product/repmgr/*version* | -| Replication Server | eprs | product/eprs/*version* | -| Slony | slony | product/slony/*version* | +| Replication Manager | repmgr | product/repmgr/*version* | John Dalton | +| Replication Server | eprs | product/eprs/*version* | Jphn Dalton | +| Slony | slony | product/slony/*version* | | diff --git a/product_docs/docs/biganimal/release/using_cluster/06_demonstration_oracle_compatibility.mdx b/product_docs/docs/biganimal/release/using_cluster/06_demonstration_oracle_compatibility.mdx index af0baa9f8a3..f9577793866 100644 --- a/product_docs/docs/biganimal/release/using_cluster/06_demonstration_oracle_compatibility.mdx +++ b/product_docs/docs/biganimal/release/using_cluster/06_demonstration_oracle_compatibility.mdx @@ -1,6 +1,7 @@ --- title: "Demonstration of Oracle SQL compatible functions and syntax" -navTitle: "Demo: Oracle SQL compatibility" +navTitle: "Oracle SQL compatibility" +showInteractiveBadge: true --- BigAnimal lets you run Oracle SQL queries in the cloud via [EDB Postgres Advanced Server](https://www.enterprisedb.com/docs/epas/latest/epas_compat_ora_dev_guide/). This topic demonstrates two Oracle SQL-syntax queries running unmodified on a BigAnimal test cluster, populated with the [Chinook sample database](https://github.com/lerocha/chinook-database). @@ -8,10 +9,10 @@ BigAnimal lets you run Oracle SQL queries in the cloud via [EDB Postgres Advance Watch the video, or load up psql and follow along below!
-
@@ -37,20 +38,20 @@ postgres://demo:password@p-c64p9a3h5vfavr7tfrjg.qsbilba3hlgp1vqr.biganimal.io:54 In case you're unfamiliar with [PostgreSQL connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6), let's break that down: - `demo` is the user role we're connecting as. This is a user set up with select privileges on the database. -- `password` is the password for this user. +- `password` is the password for this user. !!! Warning Passwords in connection strings. This example illustrates a complete connection URL, including the password. This is fine for a demonstration, - and may also be acceptable for applications configuration if access to the configuration is limited. + and may also be acceptable for applications configuration if access to the configuration is limited. Avoid this practice for admin, superuser, or other roles used interactively - psql will prompt for a password - if none is supplied. -- `p-c64p9a3h5vfavr7tfrjg.qsbilba3hlgp1vqr.biganimal.io` is the host name for the Advanced Server cluster on BigAnimal that I'm connecting to. + if none is supplied. +- `p-c64p9a3h5vfavr7tfrjg.qsbilba3hlgp1vqr.biganimal.io` is the host name for the Advanced Server cluster on BigAnimal that I'm connecting to. - `5432` is the usual PostgreSQL port number. - `chinook` is the name of the database. - `sslmode=require` ensures that we establish a secure connection. With that in hand, we can launch psql: -```shell +```shell psql postgres://demo:password@p-c64p9a3h5vfavr7tfrjg.qsbilba3hlgp1vqr.biganimal.io:5432/chinook?sslmode=require __OUTPUT__ psql (13.0 (Debian 13.0-1.pgdg100+1), server 13.4.8 (Debian 13.4.8-1+deb10)) @@ -86,7 +87,7 @@ __OUTPUT__ ... ``` -There's an employee table, let's examine its definition: +There's an employee table, let's examine its definition: ``` \d+ employee @@ -117,17 +118,17 @@ other employees who may in turn report to still *other* employees. ## Demo #1: exposing an organization hierarchy with `CONNECT BY` -Let's construct a [hierarchical query](https://www.enterprisedb.com/docs/epas/latest/epas_compat_ora_dev_guide/03_advanced_concepts/05_hierarchical_queries/) to expose this [chain of command](https://en.wikipedia.org/wiki/Chain_of_command). +Let's construct a [hierarchical query](https://www.enterprisedb.com/docs/epas/latest/epas_compat_ora_dev_guide/03_advanced_concepts/05_hierarchical_queries/) to expose this [chain of command](https://en.wikipedia.org/wiki/Chain_of_command). Modern SQL would use a recursive CTE for this, as those are widely supported. But Oracle has, for decades, supported an alternative mechanism for querying hierarchy in the form of `CONNECT BY` - let's put that into action: ```sql SELECT firstname, lastname, ( - SELECT LISTAGG(lastname, ', ') - FROM employee rt - START WITH rt.employeeid=e.reportsto + SELECT LISTAGG(lastname, ', ') + FROM employee rt + START WITH rt.employeeid=e.reportsto CONNECT BY employeeid = PRIOR reportsto - ) AS "chain of command" + ) AS "chain of command" FROM employee e; __OUTPUT__ firstname | lastname | chain of command @@ -148,11 +149,11 @@ Now, the `LISTAGG()` function was introduced in Oracle 11g Release 2. Very few d ```sql SELECT firstname, lastname, ( - SELECT string_agg(lastname, ', ') - FROM employee rt - START WITH rt.employeeid=e.reportsto + SELECT string_agg(lastname, ', ') + FROM employee rt + START WITH rt.employeeid=e.reportsto CONNECT BY employeeid = PRIOR reportsto - ) AS "chain of command" + ) AS "chain of command" FROM employee e; __OUTPUT__ firstname | lastname | chain of command @@ -168,20 +169,20 @@ __OUTPUT__ (8 rows) ``` -But [the semantics of the two functions are different for even slightly less-trivial uses](https://www.enterprisedb.com/blog/how-workaround-oracle-listagg-function-postgresql), specifically when using the grouping construct. +But [the semantics of the two functions are different for even slightly less-trivial uses](https://www.enterprisedb.com/blog/how-workaround-oracle-listagg-function-postgresql), specifically when using the grouping construct. -Let's demonstrate that. +Let's demonstrate that. ## Demo #2: group concatenation with `LISTAGG` As we saw above, this database has "album" and "track" tables containing metadata on digital recordings. We can use some analytic functions, including `LISTAGG`, to put together a report on average track storage requirements for albums with "baby" in the title. ```sql -SELECT UNIQUE title, +SELECT UNIQUE title, ROUND(AVG(bytes) OVER (PARTITION BY mediatypeid)/1048576 ) media_avg_mb, - LISTAGG(t.name || ' (' || ROUND(bytes/1048576) || ' mb)', chr(10)) + LISTAGG(t.name || ' (' || ROUND(bytes/1048576) || ' mb)', chr(10)) WITHIN GROUP (ORDER BY trackid) - OVER (PARTITION BY title) track_list + OVER (PARTITION BY title) track_list FROM track t JOIN album USING (albumid) JOIN mediatype USING (mediatypeid) @@ -208,11 +209,11 @@ __OUTPUT__ If we try replacing `LISTAGG` with `string_agg` in this example, it's going to fail - the [expression syntax for `string_agg`](https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-AGGREGATES) is different. ```sql -SELECT UNIQUE title, +SELECT UNIQUE title, ROUND(AVG(bytes) OVER (PARTITION BY mediatypeid)/1048576 ) media_avg_mb, - string_agg(t.name || ' (' || ROUND(bytes/1048576) || ' mb)', chr(10)) + string_agg(t.name || ' (' || ROUND(bytes/1048576) || ' mb)', chr(10)) WITHIN GROUP (ORDER BY trackid) - OVER (PARTITION BY title) track_list + OVER (PARTITION BY title) track_list FROM track t JOIN album USING (albumid) JOIN mediatype USING (mediatypeid) @@ -225,13 +226,13 @@ LINE 3: string_agg(t.name || ' (' || ROUND(bytes/1048576) || ... HINT: No function matches the given name and argument types. You might need to add explicit type casts. ``` -Now, this isn't terribly difficult to correct, but it requires restructuring the query to replace the grouping construct - such work can quickly accumulate errors. Fortunately, [EDB Postgres Advanced Server](https://www.enterprisedb.com/docs/epas/latest/) -supports [`LISTAGG`](https://www.enterprisedb.com/docs/epas/latest/epas_compat_reference/02_the_sql_language/03_functions_and_operators/11_aggregate_functions/#listagg) AND `string_agg`, +Now, this isn't terribly difficult to correct, but it requires restructuring the query to replace the grouping construct - such work can quickly accumulate errors. Fortunately, [EDB Postgres Advanced Server](https://www.enterprisedb.com/docs/epas/latest/) +supports [`LISTAGG`](https://www.enterprisedb.com/docs/epas/latest/epas_compat_reference/02_the_sql_language/03_functions_and_operators/11_aggregate_functions/#listagg) AND `string_agg`, so this query doesn't need to change when migrating from Oracle. ## Compatibility preserves the value of your existing work -In both of the examples shown here, you probably would not use the functions and syntax demonstrated for new work; there are +In both of the examples shown here, you probably would not use the functions and syntax demonstrated for new work; there are better, more familiar or at least more widely-available equivalents provided natively by PostgreSQL (and many other databases). But by supporting them, EDB Advanced Server gives you the ability to reuse existing logic with minimal modification, allowing you to focus your time and expertise on solving new problems. diff --git a/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_download_complete.png b/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_download_complete.png old mode 100755 new mode 100644 index ad337229e54..fafd64dec7c --- a/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_download_complete.png +++ b/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_download_complete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d61bd5db386021d0a0e8252fc64600ffc0525f9311c10ec0ddc2ef45f7e2e29c -size 64235 +oid sha256:008953e9d83454319a1cc04f195815589588ac96365a80f3563df1d4612ee55c +size 131400 diff --git a/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_inst_complete.png b/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_inst_complete.png old mode 100755 new mode 100644 index cc04a1f92f5..e180710b0ef --- a/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_inst_complete.png +++ b/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_inst_complete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e19ba6cb7a751f2b8c192b5373036887ea4b0091e31e981ac2f98716e323e775 -size 46471 +oid sha256:743fad9cf0b510566beca45a843b66795b08b4340331d24f7a2f7144b3df18d3 +size 136101 diff --git a/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_welcome.png b/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_welcome.png old mode 100755 new mode 100644 index f4640801793..64fa5de8b8f --- a/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_welcome.png +++ b/product_docs/docs/migration_toolkit/55/images/installing_mtk_sbp_welcome.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4eee0afc481473e82ff91e7fff2f037b4c098d6a6709336bfce9a88d4caebf7 -size 65343 +oid sha256:b12c65e885abe30e37248472022e6bbf17cbdf65c4cafa716383f71afc8a6809 +size 136579 diff --git a/product_docs/docs/pem/8/pem_ha_setup/setup_ha_using_efm.mdx b/product_docs/docs/pem/8/pem_ha_setup/setup_ha_using_efm.mdx index 7825c90bb63..d75e405f30b 100644 --- a/product_docs/docs/pem/8/pem_ha_setup/setup_ha_using_efm.mdx +++ b/product_docs/docs/pem/8/pem_ha_setup/setup_ha_using_efm.mdx @@ -1,10 +1,10 @@ --- -title: "High Availability Using EFM" +title: "High Availability Using Failover Manager" --- Postgres Enterprise Manager (PEM) assists database administrators, system architects, and performance analysts in administering, monitoring, and tuning Postgres database servers. -EDB Postgres Failover Manager (EFM) is a high availability tool from EDB that enables a Postgres primary node to automatically failover to a standby node in the event of a software or hardware failure on the primary. +Failover Manager (EFM) is a high availability tool from EDB that enables a Postgres primary node to automatically failover to a standby node in the event of a software or hardware failure on the primary. The examples in the following sections use these IP addresses: @@ -14,30 +14,42 @@ The examples in the following sections use these IP addresses: - 172.16.161.203 - EFM Witness Node - 172.16.161.245 - PEM VIP (used by agents and users to connect) -# Initial product installation and configuration +The following needs to use the VIP address: -1. Install the following on the primary and one or more standbys +- The PEM Agent binding of the monitored database servers +- Accessing the PEM Web Client +- Accessing the Webserver services - - [EDB Postgres Advanced Server 13](https://www.enterprisedb.com/docs/epas/latest/) (as backend database server for PEM) - - [PEM Server](https://www.enterprisedb.com/docs/pem/latest/) +# Initial Product Installation and Configuration + +1. Install the following on the primary and one or more standbys: + + - [EDB Postgres Advanced Server 13](https://www.enterprisedb.com/docs/epas/latest/epas_inst_linux/) (backend database for PEM Server) + - [PEM Server](https://www.enterprisedb.com/docs/pem/latest/pem_inst_guide_linux/) - [EDB Failover Manager 4.1](https://www.enterprisedb.com/docs/efm/latest/efm_user/03_installing_efm/) - Refer to the installation instructions in the product documentation using the links above or refer to the instructions given on the [EDBrepos website](https://repos.enterprisedb.com). You need to replace the `USERNAME:PASSWORD` with your username and password in the instructions to access the EDB repositories. + Refer to the installation instructions in the product documentation using the links above or refer to the instructions given on the [EDB repos website](https://repos.enterprisedb.com). You need to replace the `USERNAME:PASSWORD` with your username and password in the instructions to access the EDB repositories. Ensure that the database server is configured to use `scram-sha-256` authentication method as the PEM Server configuration script does not work with `trust` authentication. You need to install the `java-1.8.0-openjdk` package to install EFM. -2. Configure the PEM Server on all the primary and one or more standbys independently. For more detail, see Configuring the PEM Server section in the [PEM Installation Guides](https://www.enterprisedb.com/docs/pem/latest/). +2. Configure the PEM Server on the primary server with initial configuration of type 1 (i.e. Web Services and Database): + ```text + /usr/edb/pem/bin/configure-pem-server.sh -t 1 + ``` + For more detail on configuration types see, [Configuring the PEM Server](https://www.enterprisedb.com/docs/pem/latest/pem_inst_guide_linux/04_installing_postgres_enterprise_manager/05_configuring_the_pem_server_on_linux/). -3. Add the following ports in the firewall on all the primary and standbys to allow the access: +3. Add the following ports in the firewall on the primary and all the standby servers to allow the access: - `8443` - for PEM Server (https) - `5444` - for EPAS 13 - `7800` - for EFM - `7908` - for EFM Admin + For example: + ```text $ sudo firewall-cmd --zone=public --add-port=5444/tcp --permanent success @@ -51,9 +63,9 @@ The examples in the following sections use these IP addresses: success ``` -# Set up the primary node for streaming replication. +# Set Up the Primary Node for Streaming Replication. -1. Create the replication role using the following command +1. Create the replication role using the following command. ```text $ /usr/edb/as13/bin/psql -h 172.16.161.200 -p 5444 -U enterprisedb edb -c “CREATE ROLE repl REPLICATION LOGIN PASSWORD 'password'”; @@ -73,19 +85,19 @@ The examples in the following sections use these IP addresses: For more detailed information on configuring parameters for streaming replication refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/13/warm-standby.html#STREAMING-REPLICATION). -!!! Note - The configuration parameters may be different for different versions of database server. You can email support at [techsupport@enterprisedb.com](mailto:techsupport@enterprisedb.com) for any help in setting up these parameters. + !!! Note + The configuration parameters may be different for different versions of database server. You can email support at [techsupport@enterprisedb.com](mailto:techsupport@enterprisedb.com) for any help in setting up these parameters. -3. Add the following entry in the host-based authentication (`/var/lib/edb/as13/data/pg_hba.conf`) file to allow replication user to connect from all the standbys: +3. Add the following entry in the host-based authentication (`/var/lib/edb/as13/data/pg_hba.conf`) file to allow the replication user to connect from all the standbys: ```text - hostssl replication repl 172.16.161.0/24 scram-sha-256 + hostssl replication repl 172.16.161.201/24 scram-sha-256 ``` !!! Note - You can provide ip address with a more appropriate cidr range. + You can change the cidr range of the IP address, if needed. -4. Modify the host-based authentication (`/var/lib/edb/as13/data/pg_hba.conf`) file for the `pem_user` role to connect to all databases using the `scram-sha-256` authentication method. +4. Modify the host-based authentication (`/var/lib/edb/as13/data/pg_hba.conf`) file for the `pem_user` role to connect to all databases using the `scram-sha-256` authentication method as below: ```text # Allow local PEM agents and admins to connect to PEM server @@ -97,23 +109,24 @@ The examples in the following sections use these IP addresses: hostssl pem +pem_agent 0.0.0.0/0 cert ``` -5. Restart the EPAS 13 Server +5. Restart the EPAS 13 Server. ```text systemctl restart edb-as-13.service ``` -# Set up the Standby Nodes for Streaming Replication +# Set Up the Standby Nodes for Streaming Replication -1. Stop the PEM backend database server (EPAS 13) service and the `pemagent` service on all the standby nodes: +1. Stop the service for EPAS 13 on all the standby nodes: ```text $ systemctl stop edb-as-13.service - - $ systemctl stop pemagent.service ``` -2. Remove the data directory of the PEM backend database server on all the standby nodes: + !!! Note + This example uses the `pg_basebackup` utility to create the replicas of the PEM backend database server on the standby servers. When using `pg_basebackup`, you need to stop the existing database server and remove the existing data directories. + +2. Remove the data directory of the database server on all the standby nodes: ```text $ sudo su - enterprisedb @@ -142,15 +155,22 @@ The examples in the following sections use these IP addresses: -D /var/lib/edb/as13/data -U repl -v -P -Fp -R -p 5444 ``` - The backup command creates the `postgresql.auto.conf` and the `standby.signal` file on the standby nodes. + The backup command creates the `postgresql.auto.conf` and the `standby.signal` file on the standby nodes. The `postgresql.auto.conf` file content is as below: + + ```text + sudo su - enterprisedb cat /var/lib/edb/as13/data/postgresql.auto.conf + # Do not edit this file manually + # It will be overwritten by the ALTER SYSTEM command. + primary_conninfo = ‘user=repl passfile=’’/var/lib/edb/.pgpass’’ channel_binding=prefer host=172.16.161.200 port=5444 sslmode=prefer sslcompression=0 ssl_min_protocol_version=TLSv1.2 gssencmode=prefer krbsvrname=postgres target_session_attrs=any’ + ``` -5. Edit the following parameter in `postgresql.con` file on all the standby nodes: +5. Edit the following parameter in `postgresql.conf` file on each of the standby nodes: ```text hot_standby = on ``` -6. Start the PEM backend database server (EPAS 13) on each of the standby nodes. +6. Start the EPAS 13 database server on each of the standby nodes: ```text $ systemctl enable edb-as-13 @@ -158,18 +178,68 @@ The examples in the following sections use these IP addresses: $ systemctl start edb-as-13 ``` -7. Copy the PEM agent certificates and keys from `/root/.pem` from the primary node to the standby nodes at same location. Set the following permissions to the PEM Agent Certificate file: - - ```text - $ sudo chmod 600 /root/.pem/agent1.key - - $ sudo chmod 640 /root/.pem/agent1.crt - ``` +7. Copy the following files from the primary node to the standby nodes at the same location, overwriting any existing files, and set the following permissions on the files: + + - `/etc/httpd/conf.d/edb-pem.conf` + - `/etc/httpd/conf.d/edb-ssl-pem.conf` + - `/root/.pem/agent1.crt` + - `/root/.pem/agent1.key` + - `/usr/edb/pem/agent/etc/agent.cfg` + - `/usr/edb/pem/share/.install-config` + - `/usr/edb/pem/web/pem.wsgi` + - `/usr/edb/pem/web/config_setup.py` + +For example, + +```text + $ mkdir -p /root/.pem + $ chown root:root /root/.pem + $ chmod 0755 /root/.pem + $ mkdir -p /var/lib/pemhome/.pem + $ chown pem:pem /var/lib/pemhome/.pem + $ chmod 0700 /var/lib/pemhome/.pem + $ mkdir -p /usr/edb/pem/logs + $ chown root:root /usr/edb/pem/logs + $ chmod 0755 /usr/edb/pem/logs + $ for file in /etc/httpd/conf.d/edb-pem.conf \ + /etc/httpd/conf.d/edb-ssl-pem.conf \ + /root/.pem/agent1.crt \ + /usr/edb/pem/agent/etc/agent.cfg \ + /usr/edb/pem/share/.install-config \ + /usr/edb/pem/web/pem.wsgi \ + /usr/edb/pem/web/config_setup.py; do \ + chown root:root ${file}; \ + chmod 0644 ${file}; \ + done; + $ chmod 0600 /root/.pem/agent1.key + $ chown root:root /root/.pem/agent1.key +``` + +This ensures that webserver is configured on the standby and is disabled by default. It is enabled automatically at switchover by EFM. !!! Note You need to keep the certificates in sync on master and standbys manually whenever the certificates are updated. -# Set up EFM to manage failover on all hosts +8. Run the `configure-selinux.sh` script to configure the SELinux policy for PEM as following: + +```text + $ /usr/edb/pem/bin/configure-selinux.sh + getenforce found, now executing 'getenforce' command + Configure the httpd to work with the SELinux + Allow the httpd to connect the database (httpd_can_network_connect_db = on) + Allow the httpd to connect the network (httpd_can_network_connect = on) + Allow the httpd to work with cgi (httpd_enable_cgi = on) + Allow to read & write permission on the 'pem' user home directory + SELinux policy is configured for PEM + + $ sudo chmod 640 /root/.pem/agent1.crt +``` + +!!! Note + At this point you should have a PEM Primary Server and two standbys that are ready to take over from the primary whenever needed. + + +# Set Up EFM to Manage Failover on All Hosts 1. Prepare the Primary Node to support EFM: @@ -177,6 +247,8 @@ The examples in the following sections use these IP addresses: - Grant the execute privileges on the functions related to WAL logs and the monitoring privileges to the user. - Add entries in pg_hba.conf to allow the `efm` database user to connect to the database server from all nodes on all the hosts. - Reload the configurations on all the database servers. + + For example, ```text $ cat > /tmp/efm-role.sql << _EOF_ @@ -273,7 +345,7 @@ The examples in the following sections use these IP addresses: $ sudo chmod a+r /etc/edb/efm-4.1/efm.properties ``` -7. Encrypt the `efm` user's password using efm utility: +7. Encrypt the efm user's password using efm utility: ```text $ export EFMPASS=password @@ -284,70 +356,70 @@ The examples in the following sections use these IP addresses: 8. Edit the following parameters in the properties file: ```text - 1. db.user=efm - 2. db.password.encrypted=096666746b05b081d1a98e43d94c9dad - 3. db.port=5444 - 4. db.database=edb - 5. db.service.owner=enterprisedb - 6. db.service.name=edb-as-13 - 7. db.bin=/usr/edb/as13/bin - 8. db.data.dir=/var/lib/edb/as13/data - 9. jdbc.sslmode=require - 10. user.email=username@example.com - 11. from.email=node1@efm-pem - 12. notification.level=INFO - 13. notification.text.prefix=[PEM/EFM] - 14. bind.address=172.16.161.200:7800 - 15. admin.port=7809 - 16. is.witness=false - 17. local.period=10 - 18. local.timeout=60 - 19. local.timeout.final=10 - 20. remote.timeout=10 - 21. node.timeout=50 - 22. encrypt.agent.messages=true - 23. stop.isolated.primary=true - 24. stop.failed.primary=true - 25. primary.shutdown.as.failure=false - 26. update.physical.slots.period=0 - 27. ping.server.ip=8.8.8.8 - 28. ping.server.command=/bin/ping -q -c3 -w5 - 29. auto.allow.hosts=false - 30. stable.nodes.file=false - 31. db.reuse.connection.count=0 - 32. auto.failover=true - 33. auto.reconfigure=true - 34. promotable=true - 35. use.replay.tiebreaker=true - 36. standby.restart.delay=0 - 37. reconfigure.num.sync=false - 38. reconfigure.sync.primary=false - 39. minimum.standbys=0 - 40. recovery.check.period=1 - 41. restart.connection.timeout=60 - 42. auto.resume.period=0 - 43. virtual.ip=172.16.161.245 - 44. virtual.ip.interface=ens33 - 45. virtual.ip.prefix=24 - 46. virtual.ip.single=true - 47. check.vip.before.promotion=true - 48. pgpool.enable=false - 49. sudo.command=sudo - 50. sudo.user.command=sudo -u %u - 51. syslog.host=localhost - 52. syslog.port=514 - 53. syslog.protocol=UDP - 54. syslog.facility=LOCAL1 - 55. file.log.enabled=true - 56. syslog.enabled=false - 57. jgroups.loglevel=INFO - 58. efm.loglevel=INFO - 59. jvm.options=-Xmx128m - 60. script.fence=/usr/local/bin/stop-pemagent.sh - 61. script.post.promotion=/usr/local/bin/start-pemagent.sh + db.user=efm + db.password.encrypted=096666746b05b081d1a98e43d94c9dad + db.port=5444 + db.database=edb + db.service.owner=enterprisedb + db.service.name=edb-as-13 + db.bin=/usr/edb/as13/bin + db.data.dir=/var/lib/edb/as13/data + jdbc.sslmode=require + user.email=username@example.com + from.email=node1@efm-pem + notification.level=INFO + notification.text.prefix=[PEM/EFM] + bind.address=172.16.161.200:7800 + admin.port=7809 + is.witness=false + local.period=10 + local.timeout=60 + local.timeout.final=10 + remote.timeout=10 + node.timeout=50 + encrypt.agent.messages=true + stop.isolated.primary=true + stop.failed.primary=true + primary.shutdown.as.failure=false + update.physical.slots.period=0 + ping.server.ip=8.8.8.8 + ping.server.command=/bin/ping -q -c3 -w5 + auto.allow.hosts=false + stable.nodes.file=false + db.reuse.connection.count=0 + auto.failover=true + auto.reconfigure=true + promotable=true + use.replay.tiebreaker=true + standby.restart.delay=0 + reconfigure.num.sync=false + reconfigure.sync.primary=false + minimum.standbys=0 + recovery.check.period=1 + restart.connection.timeout=60 + auto.resume.period=0 + virtual.ip=172.16.161.245 + virtual.ip.interface=ens33 + virtual.ip.prefix=24 + virtual.ip.single=true + check.vip.before.promotion=true + pgpool.enable=false + sudo.command=sudo + sudo.user.command=sudo -u %u + syslog.host=localhost + syslog.port=514 + syslog.protocol=UDP + syslog.facility=LOCAL1 + file.log.enabled=true + syslog.enabled=false + jgroups.loglevel=INFO + efm.loglevel=INFO + jvm.options=-Xmx128m + script.remote.post.promotion=/usr/local/bin/stop-pemagent.sh + script.post.promotion=/usr/local/bin/start-pemagent.sh ``` -9. Set the value of `is.witness` configuration parameter on the witness node to `true`: +9. Set the value of the `is.witness` configuration parameter on the witness node to `true`: ```text is.witness=true @@ -408,6 +480,11 @@ The examples in the following sections use these IP addresses: This status confirms that EFM is set up successfully and managing the failover for the PEM Server. -The monitored database servers should register their PEM Agents using the VIP address. Also, access the PEM Web Client using a VIP address. +In case of failover, any of the standbys get promoted as the primary node. PEM Agents automatically connect to the new primary node. You can replace the failed primary node with a new standby using this procedure. + +# Current Limitations -In case of failover, any of the standbys get promoted as the primary node. PEM Agents automatically connect to the new primary node. All the user sessions are lost, and they will have to log in again. You can replace the failed primary node with a new standby using this procedure. +The current limitations include: +- Web console sessions for the users are lost during the switch over. +- Per user settings done from the `Preferences` dialog are lost as they’re stored in local configuration files on the file system. +- Background processes, started via `Backup`, `Restore`, and `Maintenance` dialogs, and their logs are not shared between the systems and are lost during switch over. diff --git a/src/images/screen-demo.gif b/src/images/screen-demo.gif index fc0c1f03c53..2344a7c301f 100644 Binary files a/src/images/screen-demo.gif and b/src/images/screen-demo.gif differ diff --git a/src/pages/index.js b/src/pages/index.js index bcae160b7e6..1d9a8514a6b 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,7 +1,6 @@ import React from "react"; import { Container } from "react-bootstrap"; import Icon, { iconNames } from "../components/icon/"; -import cliImg from "../images/screen-demo.gif"; import { Footer, IndexSubNav, Layout, Link, MainContent } from "../components"; const IndexCard = ({ iconName, headingText, children }) => ( @@ -43,50 +42,86 @@ const Page = () => ( {/* Sign Post */} -
- Interactive Demo -
+
+
+
+
+
+ Demo +
+
-
-
-
-
- - Illustration of a Kubernetes Terminal Command - +
+

+ + Demonstration of Oracle SQL
+ compatibility in BigAnimal + +

+

+ BigAnimal lets you run Oracle SQL queries in the cloud via EDB + Postgres Advanced Server. Watch the video, or load up psql and + follow along. +

+
+

+ + Watch demo + +

+

+ + Find out more → + +

+
-
-

- - Cloud Native Postgres +

+
+
+
+ + Interactive Demo -
- Install, Configure and Deploy PostgreSQL with Kubernetes - +
+
-

- Test drive Cloud Native Postgres in the browser. +

+

+ + Install, Configure and Deploy PostgreSQL
+ with Kubernetes + +

+

+ Want to see what it takes to get the Cloud Native PostgreSQL + Operator up and running? Try in the browser now, no downloads + required.

-

- Try the Interactive Demo → + Try it now

-

+

- Learn More + Find out more →

@@ -109,6 +144,15 @@ const Page = () => ( BigAnimal + + Oracle SQL Compatiblity + + Demo + + diff --git a/src/styles/_docs.scss b/src/styles/_docs.scss index 780047d12b8..3d9ecfe9598 100644 --- a/src/styles/_docs.scss +++ b/src/styles/_docs.scss @@ -229,3 +229,9 @@ html.katacoda-panel-active .katacoda-exec-button { font-size: 0.7rem; } } + +.homepage-headling-link { + &:hover { + text-decoration: underline; + } +}