From fc8aac13edcf4d6342b488bfc40693daa59daff0 Mon Sep 17 00:00:00 2001 From: gvasquezvargas Date: Fri, 22 Nov 2024 15:05:38 +0100 Subject: [PATCH] PGE: add 17.2 branch and release notes --- .../01_setting_configuration_parameters.mdx | 95 +++++++++++ .../docs/pge/17/administration/index.mdx | 16 ++ product_docs/docs/pge/17/deploy_options.mdx | 14 ++ product_docs/docs/pge/17/extensions.mdx | 13 ++ product_docs/docs/pge/17/index.mdx | 34 ++++ .../pge/17/installing/component_locations.mdx | 43 +++++ product_docs/docs/pge/17/installing/index.mdx | 36 ++++ .../pge/17/installing/linux_arm64/index.mdx | 13 ++ .../installing/linux_arm64/pge_debian_12.mdx | 124 ++++++++++++++ .../pge/17/installing/linux_x86_64/index.mdx | 44 +++++ .../installing/linux_x86_64/pge_debian_11.mdx | 124 ++++++++++++++ .../installing/linux_x86_64/pge_debian_12.mdx | 124 ++++++++++++++ .../linux_x86_64/pge_other_linux_8.mdx | 135 +++++++++++++++ .../linux_x86_64/pge_other_linux_9.mdx | 135 +++++++++++++++ .../17/installing/linux_x86_64/pge_rhel_8.mdx | 129 +++++++++++++++ .../17/installing/linux_x86_64/pge_rhel_9.mdx | 129 +++++++++++++++ .../installing/linux_x86_64/pge_ubuntu_20.mdx | 124 ++++++++++++++ .../installing/linux_x86_64/pge_ubuntu_22.mdx | 124 ++++++++++++++ product_docs/docs/pge/17/operation.mdx | 42 +++++ product_docs/docs/pge/17/parameters.mdx | 147 +++++++++++++++++ .../docs/pge/17/release_notes/index.mdx | 15 ++ .../pge/17/release_notes/rel_notes17.2.mdx | 12 ++ product_docs/docs/pge/17/replication.mdx | 33 ++++ .../docs/pge/17/sql_features/index.mdx | 57 +++++++ .../pge/17/sql_features/jdbctxnrollback.mdx | 111 +++++++++++++ .../docs/pge/17/sql_features/txnrollback.mdx | 55 +++++++ product_docs/docs/pge/17/tde.mdx | 8 + product_docs/docs/pge/17/upgrading/index.mdx | 11 ++ .../docs/pge/17/upgrading/major_upgrade.mdx | 155 ++++++++++++++++++ .../upgrading/minor_upgrade/apt_upgrade.mdx | 65 ++++++++ .../upgrading/minor_upgrade/dnf_upgrade.mdx | 96 +++++++++++ .../pge/17/upgrading/minor_upgrade/index.mdx | 15 ++ 32 files changed, 2278 insertions(+) create mode 100644 product_docs/docs/pge/17/administration/01_setting_configuration_parameters.mdx create mode 100644 product_docs/docs/pge/17/administration/index.mdx create mode 100644 product_docs/docs/pge/17/deploy_options.mdx create mode 100644 product_docs/docs/pge/17/extensions.mdx create mode 100644 product_docs/docs/pge/17/index.mdx create mode 100644 product_docs/docs/pge/17/installing/component_locations.mdx create mode 100644 product_docs/docs/pge/17/installing/index.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_arm64/index.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_arm64/pge_debian_12.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/index.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_11.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_12.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_8.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_9.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_8.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_9.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_20.mdx create mode 100644 product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_22.mdx create mode 100644 product_docs/docs/pge/17/operation.mdx create mode 100644 product_docs/docs/pge/17/parameters.mdx create mode 100644 product_docs/docs/pge/17/release_notes/index.mdx create mode 100644 product_docs/docs/pge/17/release_notes/rel_notes17.2.mdx create mode 100644 product_docs/docs/pge/17/replication.mdx create mode 100644 product_docs/docs/pge/17/sql_features/index.mdx create mode 100644 product_docs/docs/pge/17/sql_features/jdbctxnrollback.mdx create mode 100644 product_docs/docs/pge/17/sql_features/txnrollback.mdx create mode 100644 product_docs/docs/pge/17/tde.mdx create mode 100644 product_docs/docs/pge/17/upgrading/index.mdx create mode 100644 product_docs/docs/pge/17/upgrading/major_upgrade.mdx create mode 100644 product_docs/docs/pge/17/upgrading/minor_upgrade/apt_upgrade.mdx create mode 100644 product_docs/docs/pge/17/upgrading/minor_upgrade/dnf_upgrade.mdx create mode 100644 product_docs/docs/pge/17/upgrading/minor_upgrade/index.mdx diff --git a/product_docs/docs/pge/17/administration/01_setting_configuration_parameters.mdx b/product_docs/docs/pge/17/administration/01_setting_configuration_parameters.mdx new file mode 100644 index 00000000000..6a0cd8e19c1 --- /dev/null +++ b/product_docs/docs/pge/17/administration/01_setting_configuration_parameters.mdx @@ -0,0 +1,95 @@ +--- +title: "Setting configuration parameters" +navTitle: "Setting configuration parameters" +description: "Describes how to set the configuration parameters for EDB Postgres Extended Server." +--- + +Set each configuration parameter using a name/value pair. Parameter names aren't case sensitive. The parameter name is typically separated from its value by an optional equals sign (`=`). + +This example shows some configuration parameter settings in the `postgresql.conf` file: + +```ini +# This is a comment +log_connections = yes +log_destination = 'syslog' +search_path = '"$user", public' +shared_buffers = 128MB +``` + +## Types of parameter values + +Parameter values are specified as one of five types: + +- **Boolean** — Acceptable values are `on`, `off`, `true`, `false`, `yes`, `no`, `1`, `0`, or any unambiguous prefix of these. +- **Integer** — Number without a fractional part. +- **Floating point** — Number with an optional fractional part separated by a decimal point. +- **String** — Text value enclosed in single quotes if the value isn't a simple identifier or number, that is, the value contains special characters such as spaces or other punctuation marks. +- **Enum** — Specific set of string values. The allowed values can be found in the system view `pg_settings.enumvals`. Enum values are not case sensitive. + +Some settings specify a memory or time value. Each of these has an implicit unit, which is kilobytes, blocks (typically 8 kilobytes), milliseconds, seconds, or minutes. You can find default units by referencing the system view `pg_settings.unit`. You can specify a different unit explicitly. + +Valid memory units are: +- `kB` (kilobytes) +- `MB` (megabytes) +- `GB` (gigabytes). + +Valid time units are: +- `ms` (milliseconds) +- `s` (seconds) +- `min` (minutes) +- `h` (hours) +- `d` (days). + +The multiplier for memory units is 1024. + +## Specifying configuration parameter settings + +A number of parameter settings are set when the EDB Postgres Extended Server database product is built. These are read-only parameters, and you can't change their values. A couple of parameters are also permanently set for each database when the database is created. These parameters are read-only and you can't later change them for the database. However, there are a number of ways to specify the configuration parameter settings: + +- The initial settings for almost all configurable parameters across the entire database cluster are listed in the `postgresql.conf` configuration file. These settings are put into effect upon database server start or restart. You can override some of these initial parameter settings. All configuration parameters have built-in default settings that are in effect unless you explicitly override them. + +- Configuration parameters in the `postgresql.conf` file are overridden when the same parameters are included in the `postgresql.auto.conf` file. Use the `ALTER SYSTEM` command to manage the configuration parameters in the `postgresql.auto.conf` file. + +- You can modify parameter settings in the configuration file while the database server is running. If the configuration file is then reloaded (meaning a SIGHUP signal is issued), for certain parameter types, the changed parameters settings immediately take effect. For some of these parameter types, the new settings are available in a currently running session immediately after the reload. For others, you must start a new session to use the new settings. And for some others, modified settings don't take effect until the database server is stopped and restarted. See the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/config-setting.html) for information on how to reload the configuration file. + +- You can use the SQL commands `ALTER DATABASE`, `ALTER ROLE`, or `ALTER ROLE IN DATABASE` to modify certain parameter settings. The modified parameter settings take effect for new sessions after you execute the command. `ALTER DATABASE` affects new sessions connecting to the specified database. `ALTER ROLE` affects new sessions started by the specified role. `ALTER ROLE IN DATABASE` affects new sessions started by the specified role connecting to the specified database. Parameter settings established by these SQL commands remain in effect indefinitely, across database server restarts, overriding settings established by the other methods. You can change parameter settings established using the `ALTER DATABASE`, `ALTER ROLE`, or `ALTER ROLE IN DATABASE` commands by either: + + - Reissuing these commands with a different parameter value. + + - Issuing these commands using the `SET parameter TO DEFAULT` clause or the `RESET parameter` clause. These clauses change the parameter back to using the setting set by the other methods. See the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/sql-commands.html) for the syntax of these SQL commands. + +- You can make changes for certain parameter settings for the duration of individual sessions using the `PGOPTIONS` environment variable or by using the `SET` command in the EDB-PSQL or PSQL command-line programs. Parameter settings made this way override settings established using any of the methods discussed earlier, but only during that session. + +## Modifying the postgresql.conf file + +The configuration parameters in the `postgresql.conf` file specify server behavior with regard to auditing, authentication, encryption, and other behaviors. On Linux and Windows hosts, the `postgresql.conf` file resides in the `data` directory under your EDB Postgres Extended Server installation. + +Parameters that are preceded by a pound sign (#) are set to their default value. To change a parameter value, remove the pound sign and enter a new value. After setting or changing a parameter, you must either `reload` or `restart` the server for the new parameter value to take effect. + +In the `postgresql.conf` file, some parameters contain comments that indicate `change requires restart`. To view a list of the parameters that require a server restart, use the following query at the psql command line: + +```sql +SELECT name FROM pg_settings WHERE context = 'postmaster'; +``` + + + +## Modifying the pg_hba.conf file + +Appropriate authentication methods provide protection and security. Entries in the `pg_hba.conf` file specify the authentication methods that the server uses with connecting clients. Before connecting to the server, you might need to modify the authentication properties specified in the `pg_hba.conf` file. + +When you invoke the initdb utility to create a cluster, the utility creates a `pg_hba.conf` file for that cluster that specifies the type of authentication required from connecting clients. You can modify this file. After modifying the authentication settings in the `pg_hba.conf` file, restart the server and apply the changes. For more information about authentication and modifying the `pg_hba.conf` file, see the [PostgreSQL core documentation](https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html). + +When the server receives a connection request, it verifies the credentials provided against the authentication settings in the `pg_hba.conf` file before allowing a connection to a database. To log the `pg_hba.conf` file entry to authenticate a connection to the server, set the `log_connections` parameter to `ON` in the `postgresql.conf` file. + +A record specifies a connection type, database name, user name, client IP address, and the authentication method to authorize a connection upon matching these parameters in the `pg_hba.conf` file. Once the connection to a server is authorized, you can see the matched line number and the authentication record from the `pg_hba.conf` file. + +This example shows a log detail for a valid `pg_hba.conf` entry after successful authentication: + +```shell +2020-05-08 10:42:17 IST LOG: connection received: host=[local] +2020-05-08 10:42:17 IST LOG: connection authorized: user=u1 database=edb +application_name=psql +2020-05-08 10:42:17 IST DETAIL: Connection matched pg_hba.conf line 84: +"local all all md5" +``` diff --git a/product_docs/docs/pge/17/administration/index.mdx b/product_docs/docs/pge/17/administration/index.mdx new file mode 100644 index 00000000000..08b4255196f --- /dev/null +++ b/product_docs/docs/pge/17/administration/index.mdx @@ -0,0 +1,16 @@ +--- +title: "Database configuration" +description: "How to configure EDB Postgres Extended Server databases." +navigation: +- 01_configuration_parameters +--- + +EDB Postgres Extended Server includes features to help you to maintain, secure, and operate EDB Postgres Extended Server databases. + +You can configure grand unified configuration (GUC) parameters at runtime by modifying the `postgresql.conf` and `pg_hba.conf` files. + +- The `postgresql.conf` file allows you to make persistent changes to your database configuration. +- The `pg_hba.conf` file allows you to change access and authentication settings. + +See [Setting configuration parameters](01_setting_configuration_parameters) for more information. + diff --git a/product_docs/docs/pge/17/deploy_options.mdx b/product_docs/docs/pge/17/deploy_options.mdx new file mode 100644 index 00000000000..7499961f6ff --- /dev/null +++ b/product_docs/docs/pge/17/deploy_options.mdx @@ -0,0 +1,14 @@ +--- + +title: Deployment options +originalFilePath: index.md +description: Deployment options available for EDB Postgres Extended Server. +--- + +The deployment options include: + +- [Installing](installing) on a virtual machine or physical server using native packages + +- Deploying it with [EDB Postgres Distributed](/pgd/latest/) using [Trusted Postgres Architect](/pgd/latest/deploy-config/deploy-tpa/) + +- Deploying it on [EDB Postgres AI Cloud Service](/edb-postgres-ai/cloud-service/) with extreme-high-availability cluster types diff --git a/product_docs/docs/pge/17/extensions.mdx b/product_docs/docs/pge/17/extensions.mdx new file mode 100644 index 00000000000..86bf83bce1d --- /dev/null +++ b/product_docs/docs/pge/17/extensions.mdx @@ -0,0 +1,13 @@ +--- +navTitle: Extensions +title: Postgres extensions supported in EDB Postgres Extended Server +description: Postgres extensions supported in EDB Postgres Extended Server. +--- + +EDB provides support for several Postgres extensions on EDB Postgres Extended Server: + +- Open-source extensions +- EDB supported open-source extensions +- EDB-developed extensions + +See [Postgres extensions available by deployment](/pg_extensions/) for an overview of all supported extensions and links to their documentation sites. \ No newline at end of file diff --git a/product_docs/docs/pge/17/index.mdx b/product_docs/docs/pge/17/index.mdx new file mode 100644 index 00000000000..daaeaa72cb7 --- /dev/null +++ b/product_docs/docs/pge/17/index.mdx @@ -0,0 +1,34 @@ +--- +title: EDB Postgres Extended Server +originalFilePath: index.md +navigation: + - release_notes + - "#Get Started" + - deploy_options + - installing + - administration + - "#Features" + - tde + - replication + - extensions + - "#Upgrade" + - upgrading + - "#Reference" + - parameters + - sql_features + - operation +indexCards: simple +--- + +EDB Postgres Extended Server is a Postgres database server distribution built on open-source, community PostgreSQL. It's fully compatible with PostgreSQL. If you have applications written and tested to work with PostgreSQL, they will behave the same with EDB Postgres Extended Server. We will support and fix any functionality or behavior differences between community PostgreSQL and EDB Postgres Extended Server. + +EDB Postgres Extended Server's primary purpose is to extend PostgreSQL with a limited number of features that can't be implemented as extensions, such as [enhanced replication optimization](replication) used by [EDB Postgres Distributed](/pgd/latest/) and [Transparent Data Encryption](/tde/latest/), while maintaining parity in other respects. + +Additional value-add enterprise features include: +- Security though [Transparent Data Encryption](/tde/latest/) + +- Optional [SQL superset](sql_features) to community PostgreSQL +- [WAL pacing delays to avoid flooding transaction logs](./operation/#avoid-flooding-transaction-logs) +- [Additional tracing and diagnostics options](./operation/#additional-tracing-and-diagnostics-options) + +--- diff --git a/product_docs/docs/pge/17/installing/component_locations.mdx b/product_docs/docs/pge/17/installing/component_locations.mdx new file mode 100644 index 00000000000..90d1525fda4 --- /dev/null +++ b/product_docs/docs/pge/17/installing/component_locations.mdx @@ -0,0 +1,43 @@ +--- +title: Default component locations +navTitle: Component locations +description: "Provides information about accessing EDB Postgres Extended Server components after installation." +--- + +The package managers for the various Linux variations install EDB Postgres Extended Server components in different locations. If you need to access the components after installation, see: + +- [RHEL/OL/Rocky Linux/AlmaLinux/CentOS/SLES locations](#rhelolrocky-linuxalmalinuxcentossles-locations) +- [Debian/Ubuntu locations](#debianubuntu-locations) + +## RHEL/OL/Rocky Linux/AlmaLinux/CentOS/SLES Locations + +The RPM installers place EDB Postgres Extended Server components in the directories listed in the table. + +| Component | Location | +|-----------------------------|--------------------------------| +| Executables | `/usr/edb/pge16/bin` | +| Libraries | `/usr/edb/pge16/lib` | +| Cluster configuration files | `/var/lib/edb-pge/16` | +| Documentation | `/usr/edb/pge16/share/man` | +| Contrib | `/usr/edb/pge16/share/contrib` | +| Data | `/var/lib/edb-pge/16/data` | +| Logs | `/var/log/edb/pge16` | +| Lock files | `/var/lock/edb/pge16` | +| Backup area | `/var/lib/edb-pge/16/backups` | +| Templates | `/usr/edb/pge16/share` | +| Procedural Languages | `/usr/edb/pge16/lib` | +| Development Headers | `/usr/edb/pge16/include` | +| Shared data | `/usr/edb/pge16/share` | + +## Debian/Ubuntu Locations + +The Debian package manager places EDB Postgres Extended Server components in the directories listed in the table. + +| Component | Location | +|-----------------------------|------------------------------------| +| Executables | `/usr/lib/edb-pge/16/bin` | +| Libraries | `/usr/lib/edb-pge/16/lib` | +| Cluster configuration files | `/var/lib/edb-pge/16/main` | +| Data | `/var/lib/edb-pge/16/main` | +| Logs | `/var/log/edb-pge/` | +| Lock files | `/var/lock/edb/pge16` | diff --git a/product_docs/docs/pge/17/installing/index.mdx b/product_docs/docs/pge/17/installing/index.mdx new file mode 100644 index 00000000000..0cc88e55d5e --- /dev/null +++ b/product_docs/docs/pge/17/installing/index.mdx @@ -0,0 +1,36 @@ +--- +navTitle: Installing +title: Installing EDB Postgres Extended Server on Linux + +description: Installation instructions for EDB Postgres Extended Server on Linux. + +navigation: + - linux_x86_64 + - linux_arm64 +--- + +Select a link to access the applicable installation instructions: + +## Linux [x86-64 (amd64)](linux_x86_64) + +### Red Hat Enterprise Linux (RHEL) and derivatives + +- [RHEL 9](linux_x86_64/pge_rhel_9), [RHEL 8](linux_x86_64/pge_rhel_8) + +- [Oracle Linux (OL) 9](linux_x86_64/pge_rhel_9), [Oracle Linux (OL) 8](linux_x86_64/pge_rhel_8) + +- [Rocky Linux 9](linux_x86_64/pge_other_linux_9), [Rocky Linux 8](linux_x86_64/pge_other_linux_8) + +- [AlmaLinux 9](linux_x86_64/pge_other_linux_9), [AlmaLinux 8](linux_x86_64/pge_other_linux_8) + +### Debian and derivatives + +- [Ubuntu 22.04](linux_x86_64/pge_ubuntu_22), [Ubuntu 20.04](linux_x86_64/pge_ubuntu_20) + +- [Debian 12](linux_x86_64/pge_debian_12), [Debian 11](linux_x86_64/pge_debian_11) + +## Linux [AArch64 (ARM64)](linux_arm64) + +### Debian and derivatives + +- [Debian 12](linux_arm64/pge_debian_12) diff --git a/product_docs/docs/pge/17/installing/linux_arm64/index.mdx b/product_docs/docs/pge/17/installing/linux_arm64/index.mdx new file mode 100644 index 00000000000..230f6000758 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_arm64/index.mdx @@ -0,0 +1,13 @@ +--- +title: "Installing EDB Postgres Extended Server on Linux AArch64 (ARM64)" +navTitle: "On Linux ARM64" + +navigation: + - pge_debian_12 +--- + +Operating system-specific install instructions are described in the corresponding documentation: + +### Debian and derivatives + +- [Debian 12](pge_debian_12) diff --git a/product_docs/docs/pge/17/installing/linux_arm64/pge_debian_12.mdx b/product_docs/docs/pge/17/installing/linux_arm64/pge_debian_12.mdx new file mode 100644 index 00000000000..5d050ad2748 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_arm64/pge_debian_12.mdx @@ -0,0 +1,124 @@ +--- +navTitle: Debian 12 +title: Installing EDB Postgres Extended Server on Debian 12 arm64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `apt-cache search enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +## Install the package + +```shell +sudo apt-get -y install edb-postgresextended-16 +``` + +## Initial configuration + +This section steps you through getting started with your cluster including logging in, ensuring the installation was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/lib/edb-pge/16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/index.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/index.mdx new file mode 100644 index 00000000000..0ec9f379e21 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/index.mdx @@ -0,0 +1,44 @@ +--- +title: "Installing EDB Postgres Extended Server on Linux x86 (amd64)" +navTitle: "On Linux x86" + +navigation: + - pge_rhel_9 + - pge_rhel_8 + - pge_other_linux_9 + - pge_other_linux_8 + - pge_ubuntu_22 + - pge_ubuntu_20 + - pge_debian_12 + - pge_debian_11 +--- + +Operating system-specific install instructions are described in the corresponding documentation: + +### Red Hat Enterprise Linux (RHEL) and derivatives + +- [RHEL 9](pge_rhel_9) + +- [RHEL 8](pge_rhel_8) + +- [Oracle Linux (OL) 9](pge_rhel_9) + +- [Oracle Linux (OL) 8](pge_rhel_8) + +- [Rocky Linux 9](pge_other_linux_9) + +- [Rocky Linux 8](pge_other_linux_8) + +- [AlmaLinux 9](pge_other_linux_9) + +- [AlmaLinux 8](pge_other_linux_8) + +### Debian and derivatives + +- [Ubuntu 22.04](pge_ubuntu_22) + +- [Ubuntu 20.04](pge_ubuntu_20) + +- [Debian 12](pge_debian_12) + +- [Debian 11](pge_debian_11) diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_11.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_11.mdx new file mode 100644 index 00000000000..189cbcad2f9 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_11.mdx @@ -0,0 +1,124 @@ +--- +navTitle: Debian 11 +title: Installing EDB Postgres Extended Server on Debian 11 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `apt-cache search enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +## Install the package + +```shell +sudo apt-get -y install edb-postgresextended-16 +``` + +## Initial configuration + +This section steps you through getting started with your cluster including logging in, ensuring the installation was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/lib/edb-pge/16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_12.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_12.mdx new file mode 100644 index 00000000000..d784f6fe72e --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_debian_12.mdx @@ -0,0 +1,124 @@ +--- +navTitle: Debian 12 +title: Installing EDB Postgres Extended Server on Debian 12 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `apt-cache search enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +## Install the package + +```shell +sudo apt-get -y install edb-postgresextended-16 +``` + +## Initial configuration + +This section steps you through getting started with your cluster including logging in, ensuring the installation was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/lib/edb-pge/16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_8.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_8.mdx new file mode 100644 index 00000000000..d906afce5f7 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_8.mdx @@ -0,0 +1,135 @@ +--- +navTitle: AlmaLinux 8 or Rocky Linux 8 +title: Installing EDB Postgres Extended Server on AlmaLinux 8 or Rocky Linux 8 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `dnf repolist | grep enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +- Install the EPEL repository: + + ```shell + sudo dnf -y install epel-release + ``` + +- Enable additional repositories to resolve dependencies: + ```shell + sudo dnf config-manager --set-enabled powertools + ``` + +## Install the package + +```shell +sudo dnf -y install edb-postgresextended16-server edb-postgresextended16-contrib +``` + +## Initial configuration + +Getting started with your cluster involves logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/pge16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_9.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_9.mdx new file mode 100644 index 00000000000..5165da02a31 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_other_linux_9.mdx @@ -0,0 +1,135 @@ +--- +navTitle: AlmaLinux 9 or Rocky Linux 9 +title: Installing EDB Postgres Extended Server on AlmaLinux 9 or Rocky Linux 9 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `dnf repolist | grep enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +- Install the EPEL repository: + + ```shell + sudo dnf -y install epel-release + ``` + +- Enable additional repositories to resolve dependencies: + ```shell + sudo dnf config-manager --set-enabled crb + ``` + +## Install the package + +```shell +sudo dnf -y install edb-postgresextended16-server edb-postgresextended16-contrib +``` + +## Initial configuration + +Getting started with your cluster involves logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/pge16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_8.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_8.mdx new file mode 100644 index 00000000000..546c95cb66b --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_8.mdx @@ -0,0 +1,129 @@ +--- +navTitle: RHEL 8 or OL 8 +title: Installing EDB Postgres Extended Server on RHEL 8 or OL 8 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `dnf repolist | grep enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +- Install the EPEL repository: + ```shell + sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + ``` + +## Install the package + +```shell +sudo dnf -y install edb-postgresextended16-server edb-postgresextended16-contrib +``` + +## Initial configuration + +Getting started with your cluster involves logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/pge16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_9.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_9.mdx new file mode 100644 index 00000000000..c324e321d69 --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_rhel_9.mdx @@ -0,0 +1,129 @@ +--- +navTitle: RHEL 9 or OL 9 +title: Installing EDB Postgres Extended Server on RHEL 9 or OL 9 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `dnf repolist | grep enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +- Install the EPEL repository: + ```shell + sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + ``` + +## Install the package + +```shell +sudo dnf -y install edb-postgresextended16-server edb-postgresextended16-contrib +``` + +## Initial configuration + +Getting started with your cluster involves logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/edb/pge16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_20.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_20.mdx new file mode 100644 index 00000000000..7f310a7a15a --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_20.mdx @@ -0,0 +1,124 @@ +--- +navTitle: Ubuntu 20.04 +title: Installing EDB Postgres Extended Server on Ubuntu 20.04 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `apt-cache search enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +## Install the package + +```shell +sudo apt-get -y install edb-postgresextended-16 +``` + +## Initial configuration + +This section steps you through getting started with your cluster including logging in, ensuring the installation was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/lib/edb-pge/16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_22.mdx b/product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_22.mdx new file mode 100644 index 00000000000..61a6656848e --- /dev/null +++ b/product_docs/docs/pge/17/installing/linux_x86_64/pge_ubuntu_22.mdx @@ -0,0 +1,124 @@ +--- +navTitle: Ubuntu 22.04 +title: Installing EDB Postgres Extended Server on Ubuntu 22.04 x86_64 +# This topic is generated from templates. If you have feedback on it, instead of +# editing the page and creating a pull request, please enter a GitHub issue and +# the documentation team will update the templates accordingly. + +redirects: +--- + +## Prerequisites + +Before you begin the installation process: + +- Set up the EDB repository. + + Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step. + + To determine if your repository exists, enter this command: + + `apt-cache search enterprisedb` + + If no output is generated, the repository isn't installed. + + To set up the EDB repository: + + 1. Go to [EDB repositories](https://www.enterprisedb.com/repos-downloads). + + 1. Select the button that provides access to the EDB repository. + + 1. Select the platform and software that you want to download. + + 1. Follow the instructions for setting up the EDB repository. + +## Install the package + +```shell +sudo apt-get -y install edb-postgresextended-16 +``` + +## Initial configuration + +This section steps you through getting started with your cluster including logging in, ensuring the installation was successful, connecting to your cluster, and creating the user password. + +First, you need to initialize and start the database cluster. The `edb-pge-16-setup` script creates a cluster. + +```shell +sudo PGSETUP_INITDB_OPTIONS="-E UTF-8" /usr/lib/edb-pge/16/bin/edb-pge-16-setup initdb + +sudo systemctl start edb-pge-16 +``` + +To work in your cluster, log in as the postgres user. Connect to the database server using the psql command-line client. Alternatively, you can use a client of your choice with the appropriate connection string. + +```shell +sudo -iu postgres + +psql postgres +``` + +The server runs with the `peer` or `ident` permission by default. You can change the authentication method by modifying the `pg_hba.conf` file. + +Before changing the authentication method, assign a password to the database superuser, postgres. For more information on changing the authentication, see [Modifying the pg_hba.conf file](../../administration/01_setting_configuration_parameters/#modifying-the-pg_hbaconf-file). + +```sql +ALTER ROLE postgres with PASSWORD 'password'; +``` + +## Experiment + +Now you're ready to create and connect to a database, create a table, insert data in a table, and view the data from the table. + +First, use psql to create a database named `hr` to hold human resource information. + +```sql +# running in psql +CREATE DATABASE hr; +__OUTPUT__ +CREATE DATABASE +``` + +Connect to the `hr` database inside psql: + +``` +\c hr +__OUTPUT__ +You are now connected to database "hr" as user "postgres". +``` + +Create columns to hold department numbers, unique department names, and locations: + +``` +CREATE TABLE public.dept (deptno numeric(2) NOT NULL CONSTRAINT dept_pk +PRIMARY KEY, dname varchar(14) CONSTRAINT dept_dname_uq UNIQUE, loc +varchar(13)); +__OUTPUT__ +CREATE TABLE +``` + +Insert values into the `dept` table: + +``` +INSERT INTO dept VALUES (10,'ACCOUNTING','NEW YORK'); +__OUTPUT__ +INSERT 0 1 +``` + +``` +INSERT into dept VALUES (20,'RESEARCH','DALLAS'); +__OUTPUT__ +INSERT 0 1 +``` + +View the table data by selecting the values from the table: + +``` +SELECT * FROM dept; +__OUTPUT__ +deptno | dname | loc +--------+------------+---------- +10 | ACCOUNTING | NEW YORK +20 | RESEARCH | DALLAS +(2 rows) +``` diff --git a/product_docs/docs/pge/17/operation.mdx b/product_docs/docs/pge/17/operation.mdx new file mode 100644 index 00000000000..2fbcc4aef69 --- /dev/null +++ b/product_docs/docs/pge/17/operation.mdx @@ -0,0 +1,42 @@ +--- +title: Operations +originalFilePath: operation.md +description: Operational features of EDB Postgres Extended Server including WAL pacing delays, additional tracing and diagnostics options. +--- + +EDB Postgres Extended Server has a number of features that relate to operations. + +## Avoid flooding transaction logs + +EDB Postgres Extended Server provides WAL pacing delays to avoid flooding transaction logs. The WAL pacing configuration parameters are: + - `wal_insert_delay_enabled` + - `wal_insert_delay` + - `wal_insert_delay_size` + +When `wal_insert_delay_enabled` is enabled, a session sleeps based on the value of `wal_insert_delay` after WAL data of at least the value of `wal_insert_delay_size` is generated. The default is off. + +## Additional tracing and diagnostics options + +EDB Postgres Extended Server allows you to enable timeouts based on logging trace messages in specific code +paths. Use the `tracelog_timeout` configuration parameter to allow logging of trace messages after a timeout of +the specified time occurs. + +## Selective physical base backup and subsequent selective recovery/restore + +By default, backups are always taken of the entire database cluster. You can also back up individual databases or database objects by specifying +the `-L` option with the `pg_basebackup` utility multiple times for multiple databases. + +Template databases are backed up by default. WAL data for excluded +databases is still part of the WAL archives. + +The backup activity stores the list of database objects specified using this option +in the backup label file. The presence of these objects in the backup label file causes selective recovery of these databases. Recovery of template +databases and of global metadata related to users, languages, and so on is also carried +out as usual. WAL data belonging to excluded databases is ignored during the +recovery process. Attempts to connect to excluded databases cause errors after regular +operations start following the recovery. + + +## Additional operations feature + +- Reduced locking of `ALTER TABLE ... REPLICA IDENTITY` diff --git a/product_docs/docs/pge/17/parameters.mdx b/product_docs/docs/pge/17/parameters.mdx new file mode 100644 index 00000000000..7b4f140bb2d --- /dev/null +++ b/product_docs/docs/pge/17/parameters.mdx @@ -0,0 +1,147 @@ +--- +navTitle: Configuration parameters +title: Configuration parameters (GUCs) +originalFilePath: parameters.md +description: Configuration parameters available with EDB Postgres Extended Server. +--- + +These Grand Unified Configuration (GUC) configuration parameters are available with EDB Postgres Extended Server. + +## Backend parameters + +Backend parameters introduce a test probe point infrastructure for injecting sleeps or errors into PostgreSQL and extensions. + +Any `PROBE_POINT` defined throughout the Postgres code code marks important code paths. These probe points might be activated to signal the current backend or to elog(...) a `LOG`/`ERROR`/`FATAL`/`PANIC`. They might also, or instead, add a delay at that point in the code. + +Unless explicitly activated, probe points have no effect and add only a single optimizer-hinted branch, so they're safe on hot paths. + +When an active probe point is hit and the counter is satisfied, after any specified sleep interval, a log message is always emitted at `DEBUG1` or higher. + +### `pg2q.probe_point` + +The name of a `PROBE_POINT` in the code of 2ndQPostgres or in an extension that defines a `PROBE_POINT`. This parameter isn't validated. If a nonexistent probe point is named, it's never hit. + +Only one probe point can be active. This isn't a list, and attempting to supply a list means nothing matches. + +Probe points generally have a unique name, given as the argument to the `PROBE_POINT` macro in the code where it's defined. It's also possible to use the same `PROBE_POINT` name where multiple code paths trigger the same action of interest. A probe fires when either path is taken. + +### `pg2q.probe_counter` + +You might need to act on a probe only after a loop is run for the number of times specified with this parameter. In such cases, set this GUC to the number of iterations at which point the probe point fires, and reset the counter. + +The default value is `1`, meaning the probe points always fire when the name matches. + +### `pg2q.probe_sleep` + +Sleep for `pg2q.probe_sleep` milliseconds after hitting the probe point. Then fire the action in `pg2q.probe_action`. + +### `pg2q.probe_action` + +Action to take when the named `pg2q.probe_point` is hit. Available actions are: + +- `sleep` — Emit a `DEBUG` message with the probe name. +- `log` — Emit a `LOG` message with the probe name. +- `error` — `elog(ERROR, ...)` to raise an `ERROR` condition. +- `fatal`— `elog(FATAL, ...)`. +- `panic` — `elog(PANIC, ...)`, which generally then calls `abort()` and delivers a `SIGABRT` (signal 6) to cause the backend to core dump. The probe point tries to set the core file limit to enable core dumps if the hard ulimit permits. +- `sigint`, `sigterm`, `sigquit`, `sigkill` — Deliver the named signal to the backend that hit the probe point. + +### `pg2q.probe_backend_pid` + +If nonzero, the probe sleep and action are skipped for backends other than the backend with this ID. + +## `server_2q_version_num` and `server_2q_version` + +The `server_2q_version_num` and `server_2q_version` configuration parameters allow the 2ndQuadrant-specific version number and version substring, respectively, to be accessible to external modules. + +## Table-level compression control option + +You can set the table-level option `compress_tuple_target` to decide when to trigger compression on a tuple. Previously, you used the `toast_tuple_target` (or the compile time default) to decide whether to compress a tuple. However, this was detrimental when a tuple is large enough and has a good compression ratio but not large enough to cross the toast threshold. + + + +## `pg2q.max_tuple_field_size` + +Restricts the maximum uncompressed size of the internal representation of any one field that can be written to a table, in bytes. + +The default `pg2q.max_tuple_field_size` is 1073740799 bytes, which is 1024 bytes less than 1 GiB. This value is slightly less than the 1 GiB maximum field size usually imposed by PostgreSQL. This margin helps prevent cases where tuples are committed to disk but can't then be processed by logical decoding output plugins and sent to downstream servers. + +Set `pg2q.max_tuple_field_size` to `1GB` or `11073741823` to disable the feature. + +If your application doesn't rely on inserting large fields, consider setting `pg2q.max_tuple_field_size` to a much smaller value, such as 100MB or even less. Among other issues, large fields can: + +- Cause surprising application behavior +- Increase memory consumption for the database engine during queries and replication +- Slow down logical replication + +While this parameter is enabled, oversized fields cause queries that `INSERT` or `UPDATE` an oversized field to fail with an `ERROR` such as: + +``` +ERROR: field big_binary_field_name in row is larger than pg2q.max_tuple_field_size +DETAIL: New or updated row in relation some_table has field big_binary_field_name + (attno=2) with size 8161 bytes which exceeds limit 1073740799B configured + in pg2q.max_tuple_field_size +SQLSTATE: 53400 configuration_limit_exceeded +``` + +Only the superuser can set `pg2q.max_tuple_field_size`. You can use a `SECURITY DEFINER` function wrapper if you want to allow a non-superuser to set it. + +If you change `pg2q.max_tuple_field_size`, fields larger than the current `pg2q.max_tuple_field_size` that are already on disk don't change. You can `SELECT` them as usual. Any `UPDATE` that affects tuples with oversized fields fails, even if the oversized field isn't modified, unless the new tuple created by the update operation satisfies the currently active size limits. + +A `DELETE` operation doesn't check the field-size limit. + +The limit isn't enforced on the text-representation size for I/O of fields because doing so also prevents PostgreSQL from creating and processing temporary in-memory json objects larger than the limit. + +The limit isn't enforced for temporary tuples in tuplestores, such as set-returning functions, CTEs, and views. Size checks are deliberately not enforced for any `MATERIALIZED VIEW` either. + +!!! WARNING + `pg2q.max_tuple_field_size` is enforced for `pg_restore`. If a + database contains oversized tuples, it does a `pg_dump` as usual. However, a + subsequent `pg_restore` fails with the error shown previously. To work around + this issue, restore the dump with `pg2q.max_tuple_field_size` overridden in + connection options using `PGOPTIONS` or the `options` connection-parameter + string. For example: + + ``` + PGOPTIONS='-c pg2q.max_tuple_field_size=11073741823' pg_restore ... + ``` + +Data type specifics: + +- For a `bytea` field, the size used is the decoded binary size. It isn't the text-representation size in hex or octal escape form, that is, the `octet_length()` of the field. + + Assuming `bytea_output = 'hex'`, the maximum size of the I/O representation is `2 * pg2q.max_tuple_field_size + 2` bytes. + +- For a `text`, `json`, or `xml` field, the measured size is the number of bytes of text in the current database encoding (the `octet_length()` of the field), not the number of characters. In UTF-8 encodings, one character usually consumes one byte but might consume six or more bytes for some languages and scripts. + +- For a `jsonb` field, the measured size is that of the PostgreSQL internal jsonb-encoded datatype representation, the text representation of the json document. In some cases the `jsonb` representation for larger json documents is smaller than the text representation. This means that it's possible to insert json documents with text representations larger than any given `pg2q.max_tuple_field_size`, although it's uncommon. + +- Extension-defined data type behavior depends on the implementation of the data type. + + The field size used for this limit is the size reported by them `pg_column_size()` function, minus the 4 bytes of header PostgreSQL adds to variable-length data types, when used on a literal of the target data type. For example: + + ``` + demo=> SELECT pg_column_size(BYTEA '\x00010203040506070809') - 4; + 14 + ``` + + For example, to see the computed size of the jsonb field, use: + + ``` + SELECT pg_column_size(JSONB '{"my_json_document": "yes"}') - 4; + ``` + + Due to TOAST compression ,`pg_column_size()` often reports smaller + values when called on existing on-disk fields. Also, the header for + shorter values on disk might be 1 byte instead of 4. + +## `pg2q.max_tuple_size` + +Restricts the maximum size of a single tuple that can be written to a table. This value is the total row width, including the uncompressed width of all potentially compressible or external-storage-capable field values. Field headers count against the size, but fixed row headers don't. + +Many PostgreSQL operations, such as logical replication, work on whole rows, as do many applications. You can use this setting to impose a limit on the maximum row size you consider reasonable for your application to prevent inadvertent creation of oversized rows that might pose operational issues. + +When applied to an `UPDATE` of existing tuples, `pg2q.max_tuple_size` isn't enforced as strictly as `pg2q.max_tuple_field_size`. It doesn't count the full size of unmodified values in columns with storage other than `PLAIN`. + +!!! WARNING + `pg2q.max_tuple_size` is enforced for `pg_restore`. See the caveat for `pg2q.max_tuple_field_size`. diff --git a/product_docs/docs/pge/17/release_notes/index.mdx b/product_docs/docs/pge/17/release_notes/index.mdx new file mode 100644 index 00000000000..1b96b3cd1b5 --- /dev/null +++ b/product_docs/docs/pge/17/release_notes/index.mdx @@ -0,0 +1,15 @@ +--- +title: "Release notes" +description: "Release notes for EDB Postgres Extended Server 17." +navigation: + - rel_notes17.2 +--- +The EDB Postgres Extended Server documentation describes the latest version of EDB Postgres Extended Server 17, including minor releases and patches. These release notes cover what was new in each release. + +| Version | Release date | +|---------------------------|--------------| +| [17.2](rel_notes17.2) | 22 Nov 2024 | + + + + diff --git a/product_docs/docs/pge/17/release_notes/rel_notes17.2.mdx b/product_docs/docs/pge/17/release_notes/rel_notes17.2.mdx new file mode 100644 index 00000000000..90883c2a010 --- /dev/null +++ b/product_docs/docs/pge/17/release_notes/rel_notes17.2.mdx @@ -0,0 +1,12 @@ +--- +title: EDB Postgres Extended Server 17.2 release notes +navTitle: "Version 17.2" +--- + +Released: 22 Nov 2024 + +EDB Postgres Extended Server 17.2 includes the following enhancements and bug fixes: + +| Type | Description | Addresses | +|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------| +| Upstream merge | Merged with community PostgreSQL 17.2. See the [PostgreSQL 17.2 Release Notes](https://www.postgresql.org/docs/17/release-17-2.html) for more information. | | diff --git a/product_docs/docs/pge/17/replication.mdx b/product_docs/docs/pge/17/replication.mdx new file mode 100644 index 00000000000..c7557bc05b4 --- /dev/null +++ b/product_docs/docs/pge/17/replication.mdx @@ -0,0 +1,33 @@ +--- +navTitle: Replication +title: Replication +originalFilePath: replication.md +description: EDB Postgres Extended Server provides the core functionality to support replication and high-availability features in EDB Postgres Distributed. +--- + + +EDB Postgres Extended Server provides the core functionality to support the following replication and high availability features in [EDB Postgres Distributed](/pgd/latest): + +- Commit At Most Once (CAMO) +- Group commit +- Eager replication +- Decoding worker +- Assessment tooling +- Lag tracker +- Lag control +- Timestamp snapshots +- Transaction streaming +- Missing partition conflict +- No need for UPDATE trigger on tables with TOAST +- Automatically hold back FREEZE + +## Asynchronous processing + +EDB Postgres Extended Server includes a `synchronous_replication_availability` parameter. +A value of `async` for this parameter enables asynchronous +processing when not enough standby +servers are available (when compared with the values as per +`synchronous_standby_names`). The behavior reverts +to synchronous replication when the required number of synchronous +standby servers reappear. + diff --git a/product_docs/docs/pge/17/sql_features/index.mdx b/product_docs/docs/pge/17/sql_features/index.mdx new file mode 100644 index 00000000000..adec227d769 --- /dev/null +++ b/product_docs/docs/pge/17/sql_features/index.mdx @@ -0,0 +1,57 @@ +--- +title: SQL enhancements +originalFilePath: compat.md +description: EDB Postgres Extended Server includes a number of SQL enhancements including rollback options, cursors with prepared statements, and PL/pgSQL compatibility. +navigation: + - txnrollback + - jdbctxnroolback +--- +EDB Postgres Extended Server includes a number of SQL enhancements. + +## Rollback options + +In PostgreSQL, any error in a transaction rolls back all actions +by that transaction. This behavior is different from other DBMS, such +as Oracle and SQL Server, where an error causes rollback of only the last +statement. This difference in transaction handling semantics +doesn't cause a problem in all cases, but it does make implementing business logic +in PostgreSQL difficult for Oracle Database and Microsoft SQL Server developers. + +One workaround is to manually introduce a savepoint, internally known as +subtransactions, into the application code. This is time consuming and +difficult to test. A savepoint is an additional statement and therefore increases +transaction latency. Given the overhead of additional development work +and slower performance, this approach isn't viable in most cases. + +EDB Postgres Extended Server allows you to roll back just the current statement. +The statement-level rollback feature provides an +optional mode to choose whether to allow rollback of the whole transaction +or just the current statement. No manual recoding is required. There's some added overhead, but it's lower than for a savepoint. + +See [`transaction_rollback_scope`](txnrollback) for information on setting the transaction rollback scope inside the database and [JDBC properties for rollback scope](jdbctxnrollback) for information on continuing past an error on a JDBC batch job. + + + +## Cursors with prepared statements + +EDB Postgres Extended Server allows declaring a cursor over a previously created prepared statement. + +For example: + + ``` + PREPARE foo AS ...; DECLARE c1 CURSOR FOR foo; + ``` + +## PL/pgSQL compatibility + +EDB Postgres Extended Server integrates with other migration tools with a number of PL/pgSQL compatibility features. + +For general simplicity, EDB Postgres Extended Server allows calling functions using plpqsl without the PERFORM keyword. + +For example, + +``` +BEGIN somefunc(); END +``` + +Where `somefunc` is not a keyword. diff --git a/product_docs/docs/pge/17/sql_features/jdbctxnrollback.mdx b/product_docs/docs/pge/17/sql_features/jdbctxnrollback.mdx new file mode 100644 index 00000000000..f2269a4ec46 --- /dev/null +++ b/product_docs/docs/pge/17/sql_features/jdbctxnrollback.mdx @@ -0,0 +1,111 @@ +--- +title: JDBC properties for setting rollback scope +originalFilePath: jdbctxnrollback.md + +--- + +If you're using a JDBC connector to connect to a client application, you use the `autosave` and `transaction_rollback_scope` properties together to specify the transaction rollback scope. + +You can specify these properties in either the connection URL or as an +additional properties object parameter to `DriverManager.getConnection`. + +## autosave + +The `autosave` parameter is a string that specifies what the driver does if a query containing +multiple statements fails. The possible values are: `server`, `always`, `never`, and `conservative`. + +- In `autosave=server` mode, JDBC relies on the server-side parameter `transaction_rollback_scope` +to save each statement by way of internal server savepoints before +executing the next. The server rolls back to the previous +statement if any statement in the query fails. If this parameter +isn't supported on the server side, JDBC rejects the connection. + +- In `autosave=always` mode, the JDBC driver first tries to use the server-side `transaction_rollback_scope` property. If it isn't supported, +then JDBC driver sets a savepoint before each query +statement and rolls back to that savepoint in case of failure. + +- In `autosave=never` mode (default), no savepoint activity is ever +carried out. In `autosave=conservative` mode, savepoint is set for +each query. However, the rollback is done only for rare cases like +'cached statement cannot change return type' or 'statement XXX is +not valid', so JDBC driver rolls back and retries. + +The default value for this property is `never`. + +This `autosave=server` property is useful only +with the PostgreSQL server providing `transaction_rollback_scope` +functionality. + +## transaction_rollback_scope + +The `autosave` parameter is a string that determines the range of +operations that roll back when an SQL statement fails. + +The default value is `TRANSACTION`, which causes the entire transaction or +current subtransaction to roll back. This is the only mode +that you can select with the `SET TRANSACTION` command. + +You can specify the other possible mode, `STATEMENT`, only during connection establishment, `ALTER USER`, or `ALTER DATABASE`. In that mode, only +the failed `SQL` statement is rolled back, and the transaction is put back in normal mode. + +## `autosave` test cases +Test cases for trying out values of the `autosave` property +are available in the `BatchAutoSaveTest.java` file. The following +SQL code shows the behavior that's expected when the +server provides `transaction_rollback_scope` functionality and +`autosave=server` is used on the JDBC side. + +With `autosave=server`, the following query inserts values `(1)`, `(3)`, and +`(4)` and disregards the `duplicate key violation` error: + +```sql +CREATE TABLE test (id INT PRIMARY KEY); +INSERT INTO test VALUES (2); +BEGIN; +INSERT INTO test VALUES (1); +INSERT INTO test VALUES (2); +INSERT INTO test VALUES (3); +INSERT INTO test VALUES (4); +COMMIT; +``` + + +The `artifacts` directory contains the `pgjdbc` jar file +`postgresql-REL2Q.42.2.3.180601.jar`. This file needs to +be added to the CLASSPATH as usual. It also contains the +`postgresql-REL2Q.42.2.3.180601-tests.jar` jar that can be used to test +the latest `autosave` functionality. + +You can test the `BatchAutoSaveTest.java` file provided in the `artifacts` as follows: + +1. Export CLASSPATH to build and run the test case: + + ```sh + cd artifacts + export CLASSPATH=$PWD:$PWD/postgresql-REL2Q.42.2.3.180601-tests.jar:$PWD/postgresql-REL2Q.42.2.3.180601.jar:$PWD/junit-4.12.jar:$PWD/hamcrest-core-1.3.jar + ``` + +1. Compile the supplied test file: + + ```sh + javac -d . BatchAutoSaveTest.java + ``` + +1. Run the test (assuming user as `test` and running on localhost): + + ```shell + java -Dusername=test -Dport=5432 -Dhost=localhost -Ddatabase=postgres org.junit.runner.JUnitCore org.postgresql.test.jdbc2.BatchAutoSaveTest + __OUTPUT__ + JUnit version 4.12 + .Configuration file /Users/altaf/pg/artifacts/../build.properties does not exist. Consider adding it to specify test db host and login + Configuration file /Users/altaf/pg/artifacts/../build.local.properties does not exist. Consider adding it to specify test db host and login + Configuration file /Users/altaf/pg/artifacts/../build.properties does not exist. Consider adding it to specify test db host and login + Configuration file /Users/altaf/pg/artifacts/../build.local.properties does not exist. Consider adding it to specify test db host and login + ......... + Time: 0.556 + + OK (10 tests) + ``` + +To modify the test cases, you can modify the `BatchAutoSaveTest.java` file +in the `artifacts` directory. Then compile and run the test cases. diff --git a/product_docs/docs/pge/17/sql_features/txnrollback.mdx b/product_docs/docs/pge/17/sql_features/txnrollback.mdx new file mode 100644 index 00000000000..c4c8feb5f79 --- /dev/null +++ b/product_docs/docs/pge/17/sql_features/txnrollback.mdx @@ -0,0 +1,55 @@ +--- +title: "transaction_rollback_scope parameter" +originalFilePath: txnrollback.md + +--- + +To set the transaction rollback scope inside the database, use the `transaction_rollback_scope` parameter. +The `transaction_rollback_scope` parameter has two possible values: + +- `transaction` — Standard Postgres behavior, where each error +aborts the whole transaction. + +- `statement`— An error while executing one statement affects only +that statement and not the status of the transaction as a whole. + +## Setting the parameter + +You can set the parameter as a user-level property, a connection option, or the mode for specific functions or procedures. + +### Set the parameter as a user-level property + +```sql +ALTER USER somebody SET transaction_rollback_scope TO statement; +``` + +### Set the parameter as a connection option + +```sh-session +PGOPTIONS="-c transaction_rollback_scope=statement" psql +``` + +### Set the mode for specific functions or procedures + +If using PL/pgSQL, you can set the mode for specific functions or procedures: + +```sql +ALTER FUNCTION myfunc SET transaction_rollback_scope TO statement; +``` + +## How subtransactions are handled + +If you select the `statement` value, then a subtransaction is opened just before each SQL +command. If the command is successful, the subtransaction is *committed*. If the command causes an error, the subtransaction is +rolled back, and the parent transaction can continue normally. The +effect is that an error during execution of one statement affects only +that statement and not the status of the transaction as a whole. + +Committing a subtransaction assigns the +resources it holds only to its parent transaction, which might be the top-level +transaction. Or it might be some other subtransaction if there are user-defined +savepoints involved. So this is not an "autonomous transaction." +Rolling back a subtransaction releases all the +resources it holds, such as any locks it acquired. + + diff --git a/product_docs/docs/pge/17/tde.mdx b/product_docs/docs/pge/17/tde.mdx new file mode 100644 index 00000000000..e5c33231759 --- /dev/null +++ b/product_docs/docs/pge/17/tde.mdx @@ -0,0 +1,8 @@ +--- +title: Transparent data encryption +description: Transparent data encryption (TDE) encrypts any user data stored in the database system. +--- + +Transparent data encryption (TDE) encrypts any user data stored in the database system. This encryption is transparent to the user. User data includes the actual data stored in tables and other objects as well as system catalog data such as the names of objects. + +See [Transparent data encryption](/tde/latest) for more information. \ No newline at end of file diff --git a/product_docs/docs/pge/17/upgrading/index.mdx b/product_docs/docs/pge/17/upgrading/index.mdx new file mode 100644 index 00000000000..094ca214b6c --- /dev/null +++ b/product_docs/docs/pge/17/upgrading/index.mdx @@ -0,0 +1,11 @@ +--- +navTitle: Upgrading +title: Upgrading EDB Postgres Extended Server +description: How to upgrade EDB Postgres Extended Server to a more recent version. +--- + +You can upgrade EDB Postgres Extended Server installations to a more recent version. + +- See [Upgrading a major version of EDB Postgres Extended Server](major_upgrade) for a major upgrade example. + +- See [Upgrading a minor version of EDB Postgres Extended Server](minor_upgrade) for minor upgrade examples according to your package format. diff --git a/product_docs/docs/pge/17/upgrading/major_upgrade.mdx b/product_docs/docs/pge/17/upgrading/major_upgrade.mdx new file mode 100644 index 00000000000..c8845a87db4 --- /dev/null +++ b/product_docs/docs/pge/17/upgrading/major_upgrade.mdx @@ -0,0 +1,155 @@ +--- +navTitle: "Major upgrades" +title: "Major version upgrade of EDB Postgres Extended Server" +description: Perform a major version upgrade of EDB Postgres Extended Server. +deepToc: true +--- + +To perform a major version upgrade, install the new version of EDB Postgres Extended Server, initialize an empty cluster and use pg_upgrade to migrate all data. + +If a problem occurs during the upgrade process, you can [revert to the previous version](/epas/latest/upgrading/major_upgrade/06_reverting_to_the_old_cluster/#reverting_to_the_old_cluster). + +## Overview + +1. [Prepare your upgrade](#preparing-your-upgrade) by performing a backup of the existing instance. +1. [Install the EDB Postgres Extended Server version](#installing-the-target-edb-postgres-extended-server-version) you're upgrading toward. +1. [Create a new database server](#creating-a-target-server): + 1. Create an empty directory for the new server and ensure postgres owns it. + 1. Initialize a server on a different port from the source server. + 1. Start the database server. + 1. Connect to the database server and ensure it's functioning. +1. [Upgrade to the target server](#upgrading-to-the-target-server): + 1. Stop both the source and the new server. + 1. Use pg_upgrade by specifying the source and target bin and data directories. + 1. Start the new database server. + 1. Connect to the encrypted database server and ensure the data was transferred. +1. [Clean up and delete the source server](#cleaning-up-after-upgrade): + 1. Clean up the database and its statistics. + 1. Remove the source EDB Postgres Extended Server cluster with the script provided by pg_upgrade. + +## Worked example + +This worked example upgrades an EDB Postgres Extended Server 15 database to EDB Postgres Extended Server 16. + +!!!note + You can perform major upgrades of EDB Postgres Extended Server instances in the same way you upgrade an EDB Postgres Advanced Server installation. If you need more information about the pg_upgrade utility, command line options, troubleshooting, and more, see [Upgrading an installation with pg_upgrade](/epas/latest/upgrading/major_upgrade/). + +### Preparing your upgrade + +Use [pg_dumpall](https://www.postgresql.org/docs/current/app-pg-dumpall.html), [pgBackRest](/supported-open-source/pgbackrest/), or [Barman](/supported-open-source/barman/) to create a backup of your source server. + +### Installing the target EDB Postgres Extended Server version + +[Install EDB Postgres Extended Server](../installing/) version 16. Only install the packages. Don't perform any other configurations. + +### Creating a target server + +If you don't want to create a new target instance but want to reuse an existing server with the target EDB Postgres Extended Server version, skip these steps and [ensure the target server is empty](/epas/latest/upgrading/major_upgrade/03_upgrading_to_advanced_server/#step-2---empty-the-target-database). + +1. As postgres, create an empty directory for the new server: + + ``` + mkdir /var/lib/edb-pge/16/upgrade_target + ``` + +1. As root, ensure the postgres user owns the directory: + + ``` + sudo chown postgres /var/lib/edb-pge/16/upgrade_target + sudo chgrp postgres /var/lib/edb-pge/16/upgrade_target + ``` + +1. As postgres, initialize the new server: + + ``` + /usr/lib/edb-pge/16/bin/initdb -D /var/lib/edb-pge/16/upgrade_target + ``` + + This command initializes a CONFIG directory with all configuration files for the encrypted server. + +1. Before you start the cluster, ensure the new database runs on a different port from the source server. To alter the port, edit `postgresql.conf` by uncommenting the line with `#port` and changing the port number, for example, to 5432. + +1. Start the target server: + + ``` + /usr/lib/edb-pge/16/bin/pg_ctl -D /var/lib/edb-pge/16/upgrade_target start + ``` + + !!!note + You can also start the server with the `logfile` option enabled to print errors into a logfile: + `/usr/lib/edb-pge/16/bin/pg_ctl -D /var/lib/edb-pge/16/upgrade_target -l logfile start` + + In this case, ensure the postgres user has rights to write to the log directory. + +1. Connect to the server: + + ``` + /usr/lib/edb-pge/16/bin/psql -p 5432 + ``` + + !!!note + If you're using two different Postgres versions, use the psql utility of the target server. Otherwise, the system will attempt to use psql from the previous instance. + +### Upgrading to the target server + +1. If you have any extensions or component services running in the source cluster, stop them before starting the upgrade. See [Stop all component services and servers](/epas/latest/upgrading/major_upgrade/03_upgrading_to_advanced_server/#step-4---stop-all-component-services-and-servers) for more information + +1. Stop both the source and target servers: + + ``` + /usr/lib/edb-pge/15/bin/pg_ctl -D /var/lib/edb-pge/15/upgrade-source stop + /usr/lib/edb-pge/16/bin/pg_ctl -D /var/lib/edb-pge/16/upgrade-target stop + ``` + +1. To test for incompatibilities, run the `pg_upgrade` command in check mode. + + With `-b` and `-B`, specify the source and target BIN directories. With `-d` and `-D`, specify the source and target CONFIG directories: + + ``` + /usr/lib/edb-pge/16/bin/pg_upgrade -b /usr/lib/edb-pge/15/bin -B /usr/lib/edb-pge/16/bin -d /var/lib/edb-pge/15/upgrade-source -D /var/lib/edb-pge/16/upgrade-target --check + ``` + + !!!note + The `--check` mode performs preliminary checks without executing the command. + +1. To copy data from the source server to the target server, run the `pg_upgrade` command in normal mode: + + ``` + /usr/lib/edb-pge/16/bin/pg_upgrade -b /usr/lib/edb-pge/15/bin -B /usr/lib/edb-pge/16/bin -d /var/lib/edb-pge/15/upgrade-source -D /var/lib/edb-pge/16/upgrade-target + ``` + +1. Start the target server: + + ``` + /usr/lib/edb-pge/16/bin/pg_ctl -D /var/lib/edb-pge/16/upgrade-target start + ``` + +1. Connect to the target database server: + + ``` + /usr/lib/edb-as/16/bin/psql -p 5432 + ``` + +1. Perform a spot check to ensure the databases, tables, schemas, and resources you had in the unencrypted server are available in the new server. For example, list all databases, explore the database objects, views, and so on. + +1. Restart the extensions or component services you disabled in the source cluster but in the target cluster. + +### Cleaning up after upgrade + +After you verify that pg_upgrade migrated the data successfully, and the services are running as expected, perform a cleanup. + +1. Clean up the database and its statistics: + + ``` + /usr/lib/edb-pge/16/bin/vacuumdb --all --analyze-in-stages + ``` + +1. Remove all data files of the unencrypted server with the script generated by `pg_upgrade`: + + ``` + ./delete_old_cluster.sh + ``` + +## More information + +Review [Upgrading an installation with pg_upgrade](/epas/latest/upgrading/major_upgrade/) for more information on pg_upgrade options, troubleshooting, and other considerations. diff --git a/product_docs/docs/pge/17/upgrading/minor_upgrade/apt_upgrade.mdx b/product_docs/docs/pge/17/upgrading/minor_upgrade/apt_upgrade.mdx new file mode 100644 index 00000000000..18cc18753e7 --- /dev/null +++ b/product_docs/docs/pge/17/upgrading/minor_upgrade/apt_upgrade.mdx @@ -0,0 +1,65 @@ +--- +title: "Minor EDB Postgres Extended Server upgrade of Debian packages" +navTitle: "Minor upgrades on Debian environments" +description: "Perform a minor version upgrade of EDB Postgres Extended Server with the apt-get package manager" +--- + +If you used `apt-get` to install a Debian package of EDB Postgres Extended Server (on Ubuntu, Debian), use `apt-get` to perform a minor version upgrade of the packages. + +## Overview + +1. Upgrade the EDB Postgres Extended Server packages with `apt-get install`. + +1. Restart the server with `pg_ctl`. + +1. Verify the server version with psql. + +## Worked example + +1. To upgrade the existing packages, open a command line, assume root privileges, and enter the command: + + ```shell + sudo apt-get install + ``` + + For example, if you want to upgrade to the latest minor version of EDB Postgres Extended Server 16, run: + + ```shell + sudo apt-get install edb-postgresextended-16 + ``` + + !!!Note + You can perform a search of the packages to ensure you update the right package beforehand. For example, to browse through all EDB Packages, you can run `sudo apt-cache edb`. For more information about using `apt-get` commands and options, enter `apt-get --help` at the command line. + +1. Confirm with `Y`. + + The output displays an overview of all performed processes, where you can see the packages that were upgraded. + +1. To finalize the upgrade, restart the server. Replace `` with the path to the data directory of the server or servers you're upgrading: + + ```shell + /usr/lib/edb-pge/16/bin/pg_ctl -D restart + ``` + + For example: + + ```shell + /usr/lib/edb-pge/16/bin/pg_ctl -D /var/lib/edb-pge/16/upgrade restart + ``` + +1. Verify the expected database version is running by connecting to psql: + + ```shell + /usr/lib/edb-pge/16/bin/psql + ``` + + Check the server version: + + ```psql + SHOW server_version; + __OUTPUT__ + server_version + -------------------------------------------------------------------- + 16.3 (EDB Postgres Extended Server 16.3.0) (Ubuntu 0:16.3-1.jammy) + (1 row) + ``` diff --git a/product_docs/docs/pge/17/upgrading/minor_upgrade/dnf_upgrade.mdx b/product_docs/docs/pge/17/upgrading/minor_upgrade/dnf_upgrade.mdx new file mode 100644 index 00000000000..c5b91cb3063 --- /dev/null +++ b/product_docs/docs/pge/17/upgrading/minor_upgrade/dnf_upgrade.mdx @@ -0,0 +1,96 @@ +--- +title: "Minor EDB Postgres Extended Server upgrade of RPM packages" +navTitle: "Minor upgrades on RPM environments" +description: "Perform a minor version upgrade of EDB Postgres Extended Server with the dnf package manager" +--- + +If you used `dnf` to install an RPM package of EDB Postgres Extended Server (on RHEL, AlmaLinux, Rocky Linux), use `dnf` to perform a minor version upgrade of the packages. + +## Overview + +1. Check for available updates with `dnf check-update`. + +1. Upgrade the EDB Postgres Extended Server packages with `dnf update`. + +1. Restart the server with `pg_ctl`. + +1. Verify the server version with psql. + +## Worked example + +1. To list the package updates available for your system, open a command line, assume root privileges, and enter the command: + + ```shell + sudo dnf check-update + ``` + + For example, if you want to upgrade to the latest minor version of EDB Postgres Extended Server 16, run: + + ```shell + sudo dnf check-update edb-postgresextended16 + ``` + + !!!Note + You can include wildcard values in the search term. For example, if you're looking for EDB Packages, you can run `sudo dnf check-update edb-*`. For more information about using `dnf` commands and options, enter `dnf --help` at the command line. + +1. Once you've figured the name and version of the package you want to install, use `dnf update` to install the package: + + ```shell + sudo dnf update edb-postgresextended16 + __OUTPUT__ + ================================================================================ + Package Arch Version Repository Size + ================================================================================ + Upgrading: + edb-postgresextended16 x86_64 16.3-2.el9 enterprisedb-enterprise 1.7 M + edb-postgresextended16-contrib x86_64 16.3-2.el9 enterprisedb-enterprise 724 k + edb-postgresextended16-libs x86_64 16.3-2.el9 enterprisedb-enterprise 330 k + edb-postgresextended16-server x86_64 16.3-2.el9 enterprisedb-enterprise 6.8 M + + Transaction Summary + ================================================================================ + Upgrade 4 Packages + + Total download size: 9.5 M + Is this ok [y/N] + ``` + +1. Confirm with `y`. The output displays an overview of all performed processes, where you can see the packages that were upgraded: + + ```shell + y + __OUTPUT__ + edb-postgresextended16-16.3-2.el9.x86_64 + edb-postgresextended16-contrib-16.3-2.el9.x86_64 + edb-postgresextended16-libs-16.3-2.el9.x86_64 + edb-postgresextended16-server-16.3-2.el9.x86_64 + ``` + +1. To finalize the upgrade, restart the server. Replace `` with the path to the data directory of the server or servers you're upgrading: + + ```shell + /usr/edb/pge16/bin/pg_ctl -D restart + ``` + + For example: + + ```shell + /usr/edb/pge16/bin/pg_ctl -D /var/lib/edb-pge/16/upgrade restart + ``` + +1. Verify the expected database version is running by connecting to psql: + + ```shell + /usr/edb/pge16/bin/psql + ``` + + Check the server version: + + ```psql + SHOW server_version; + __OUTPUT__ + server_version + -------------------------------------------- + 16.3 (EDB Postgres Extended Server 16.3.0) + ``` + \ No newline at end of file diff --git a/product_docs/docs/pge/17/upgrading/minor_upgrade/index.mdx b/product_docs/docs/pge/17/upgrading/minor_upgrade/index.mdx new file mode 100644 index 00000000000..613945baedc --- /dev/null +++ b/product_docs/docs/pge/17/upgrading/minor_upgrade/index.mdx @@ -0,0 +1,15 @@ +--- +title: "Minor EDB Postgres Extended Server upgrade" +navTitle: "Minor upgrades" +description: "Minor version upgrade of EDB Postgres Extended Server" +--- + +To perform a minor upgrade of your EDB Postgres Extended Server you only need to update your packages and restart the server. + +To update your packages, ensure you use the correct package manager for your operating system. + +- If you installed an RPM package of EDB Postgres Extended Server (on RHEL, AlmaLinux, Rocky Linux) with `dnf`, see [Minor EDB Postgres Extended Server upgrade of RPM packages](dnf_upgrade). + +- If you installed a Debian package of EDB Postgres Extended Server (on Ubuntu, Debian) with `apt-get`, see [Minor EDB Postgres Extended Server upgrade of Debian packages ](apt_upgrade). + +When you upgrade the packages, the packager manager installs the latest available minor version. For example, if you're running an xy.1 minor version, and the latest available minor version is xy.5, the package manager will install xy.5, skipping xy.2 to xy.4.