diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/complete.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/complete.mdx index 76e8034827e..cb8a5e13e4f 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/complete.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/complete.mdx @@ -34,8 +34,8 @@ __OUTPUT__ List of installed extensions Name | Version | Schema | Description ------------------+---------+------------+------------------------------------------------------------ - aidb | 1.0.7 | aidb | aidb: makes it easy to build AI applications with postgres - pgfs | 1.0.4 | pgfs | pgfs: enables access to filesystem-like storage locations + aidb | 2.1.1 | aidb | aidb: makes it easy to build AI applications with postgres + pgfs | 1.0.6 | pgfs | pgfs: enables access to filesystem-like storage locations vector | 0.8.0 | public | vector data type and ivfflat and hnsw access methods ``` diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/index.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/index.mdx index 7df0a19b640..a97d6c9a638 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/index.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/installing/index.mdx @@ -12,4 +12,3 @@ Pipelines is delivered as a set of extensions. Depending on how you are deployin - [Manually installing pipelines packages](packages) Once the packages are installed, you can [complete the installation](complete) by activating the extensions within Postgres. - diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/limitations.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/limitations.mdx index aea7609a886..46c2a560576 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/limitations.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/limitations.mdx @@ -32,3 +32,14 @@ The impact of this depends on what type of embedding is being performed. ### Data Formats * Pipelines currently only supports Text and Image formats. Other formats, including structured data, video, and audio, are not currently supported. + +### Upgrading + +When upgrading the aidb and pgfs extension, there is currently no support for Postgres extension upgrades. You must therefor drop and recreate the extensions when upgrading to a new version of the extensions. + +```sql +DROP EXTENSION aidb CASCADE; +DROP EXTENSION pgfs CASCADE; +CREATE EXTENSION aidb CASCADE; +CREATE EXTENSION pgfs CASCADE; +``` diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/openai-api-compatibility.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/openai-api-compatibility.mdx index 42be732e6d2..d1d30b8d234 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/openai-api-compatibility.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/openai-api-compatibility.mdx @@ -1,10 +1,10 @@ --- title: "Using an OpenAI compatible API with Pipelines" -navTitle: "OpenAI Compatible Models" +navTitle: "OpenAI compatible Models" description: "Using an OpenAI compatible API with Pipelines by setting options and credentials." --- -To make use of an OpenAI compliant API, you can use the openai_embeddings or openai_completions model providers. Note that a retriever will need to encode first so you can only use the embeddings model provider with a retriever. +To make use of an OpenAI compliant API, you can use the embeddings or completions model providers. Note that a retriever will need to encode first so you can only use the embeddings model provider with a retriever. ## Why use an OpenAI compatible API? @@ -21,8 +21,8 @@ The starting point for this process is creating a model. When you create a model ```sql select aidb.create_model( 'my_local_ollama', -'openai_embeddings', -'{"model":"llama3.3", "url":"http://llama.local:11434/v1/embeddings", "dimensions":8192}'::JSONB, +'embeddings', +'{"model":"llama3.1", "url":"http://llama.local:11434/v1/embeddings", "dimensions":2000}'::JSONB, '{"api_key":""}'::JSONB); ``` @@ -30,14 +30,14 @@ select aidb.create_model( The model name is the first parameter and set to “my_local_ollama” which we will use later. -We specify the model provider as “openai_embeddings” which is the provider that defaults to using OpenAI servers, but can be overridden by the configuration (the next parameter), to talk to any compliant server. +We specify the model provider as “embeddings” which is the provider that defaults to using OpenAI servers, but can be overridden by the configuration (the next parameter), to talk to any compliant server. ### Configuration The next parameter is the configuration. This is a JSON string, which when expanded has three parameters, the model, the url and the dimensions. ```json -'{"model":"llama3.3", "url":"http://llama.local:11434/v1/embeddings", "dimensions":8192}'::JSONB +'{"model":"llama3.1", "url":"http://llama.local:11434/v1/embeddings", "dimensions":2000}'::JSONB ``` In this case, we are setting the model to [“llama3.3”](https://ollama.com/library/llama3.3), a relatively new and powerful model. Remember to run `ollama run llama3.3` to pull and start the model on the server. @@ -48,15 +48,15 @@ The next json setting is the important one, overriding the endpoint that the aid * It has port 11434 (the default port for Ollama) open to service requests over HTTP (not HTTPS in this case). * The path to the endpoint on the server `/v1/embeddings`; the same as OpenAI. -Putting those components together we get `[`http://llama.local:11434/v1/embeddings`](http://art.local:11434/v1/embeddings","api_key":"","dimensions":8192}'::JSONB)` as our end point. +Putting those components together we get `[`http://llama.local:11434/v1/embeddings`](http://art.local:11434/v1/embeddings","api_key":"","dimensions":2000}'::JSONB)` as our end point. -The last JSON parameter in this example is “dimensions” which is a hint to the system about how many vector values to expect from the model. If we [look up llama3.3’s properties](https://ollama.com/library/llama3.3/blobs/4824460d29f2) we can see the `llama.embedding_length` value is 8192\. The provider defaults to 1536 (with some hard-wired exceptions depending on model) but it doesn’t know about llama3.3, so we have to pass the dimension value of 8192 in the configuration. +The last JSON parameter in this example is “dimensions” which is a hint to the system about how many vector values to expect from the model. If we [look up llama3.3’s properties](https://ollama.com/library/llama3.3/blobs/4824460d29f2) we can see the `llama.embedding_length` value is 8192. The provider defaults to 1536 (with some hard-wired exceptions depending on model) but it doesn’t know about llama3.3's max. Another factor is [pgvector is limited to 2000 dimensions](https://github.com/pgvector/pgvector?tab=readme-ov-file#what-if-i-want-to-index-vectors-with-more-than-2000-dimensions). So we pass a dimension value of 2000 in the configuration, to get the maximum dimensions available with pgvector. That completes the configuration parameter. ### Credentials -The last parameter is the credentials parameter, which is another JSON string. It’s usually used for carrying the `api_key` for the OpenAI service and any other necessary credential information. It is not part of the configuration and by being separate, it can be securely hidden from users with lesser permissions. For our ollama connection, we don’t need an api\_key, but the model provider currently requires that one is specified. We can specify an empty string for the api\_key to satisfy this requirement. +The last parameter is the credentials parameter, which is another JSON string. It’s usually used for carrying the `api_key` for the OpenAI service and any other necessary credential information. It is not part of the configuration and by being separate, it can be securely hidden from users with lesser permissions. For our ollama connection, we don’t need an `api_key`, but the model provider currently requires that one is specified. We can specify an empty string for the `api_key` to satisfy this requirement. ## Using the model diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/primitives.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/primitives.mdx index 4c90ab98cae..565ba6da4d2 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/primitives.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/primitives.mdx @@ -65,3 +65,17 @@ select aidb.decode_text_batch('my_bert_model', ARRAY[ 'summarize: The missile knows where it is at all times. It knows this because it knows where it isn''t. By subtracting where it is from where it isn''t, or where it isn''t from where it is (whichever is greater), it obtains a difference, or deviation. The guidance subsystem uses deviations to generate corrective commands to drive the missile from a position where it is to a position where it isn''t, and arriving at a position where it wasn''t, it now is.' ]); ``` + +## Rerank Text + +Call aidb.rerank_text to get text reranking logits. + +```sql +SELECT aidb.rerank_text('my_reranking_model', + 'What is the best open source database?', + ARRAY[ + 'PostgreSQL', + 'The quick brown fox jumps over the lazy dog.', + 'Hercule Poirot' + ]); +``` diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/completions.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/completions.mdx new file mode 100644 index 00000000000..448a6923216 --- /dev/null +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/completions.mdx @@ -0,0 +1,104 @@ +--- +title: "Completions" +navTitle: "Completions" +description: "Completions is a text completion model that enables use of any OpenAI API compatible text generation model." +--- + +Model name: `completions` + +Model aliases: + +* `openai_completions` +* `nim_completions` + +## About Completions + +Completions enables the use of any OpenAI API compatible text generation model. + +It is suitable for chat/text transforms, text completion, and other text generation tasks. + +Depending on the name of the model, the model provider will set defaults accordingly. + +When invoked as `completions` or `openai_completions`, the model provider will default to using the OpenAI API. + +When invoked as `nim_completions`, the model provider will default to using the NVIDIA NIM API. + + +## Supported aidb operations + +* decode_text +* decode_text_batch + +## Supported models + +* Any text generation model that is supported by the provider. + +## Supported OpenAI models + +See a list of supported OpenAI models [here](https://platform.openai.com/docs/models#models-overview). + +## Supported NIM models + +* [ibm/granite-guardian-3.0-8b](https://build.nvidia.com/ibm/granite-guardian-3_0-8b) +* [ibm/granite-3.0-8b-instruct](https://build.nvidia.com/ibm/granite-3_0-8b-instruct) +* [ibm/granite-3.0-3b-a800m-instruct](https://build.nvidia.com/ibm/granite-3_0-3b-a800m-instruct) +* [meta/llama-3.3-70b-instruct](https://build.nvidia.com/meta/llama-3_3-70b-instruct) +* [meta/llama-3.2-3b-instruct](https://build.nvidia.com/meta/llama-3.2-3b-instruct) +* [meta/llama-3.2-1b-instruct](https://build.nvidia.com/meta/llama-3.2-1b-instruct) +* [meta/llama-3.1-405b-instruct](https://build.nvidia.com/meta/llama-3_1-405b-instruct) +* [meta/llama-3.1-70b-instruct](https://build.nvidia.com/meta/llama-3_1-70b-instruct) +* [meta/llama-3.1-8b-instruct](https://build.nvidia.com/meta/llama-3_1-8b-instruct) +* [meta/llama3-70b-instruct](https://build.nvidia.com/meta/llama3-70b) +* [meta/llama3-8b-instruct](https://build.nvidia.com/meta/llama3-8b) +* [nvidia/llama-3.1-nemotron-70b-instruct](https://build.nvidia.com/nvidia/llama-3_1-nemotron-70b-instruct) +* [nvidia/llama-3.1-nemotron-51b-instruct](https://build.nvidia.com/nvidia/llama-3_1-nemotron-51b-instruct) +* [nvidia/nemotron-mini-4b-instruct](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct) +* [nvidia/nemotron-4-340b-instruct](https://build.nvidia.com/nvidia/nemotron-4-340b-instruct) +* [google/shieldgemma-9b](https://build.nvidia.com/google/shieldgemma-9b) +* [google/gemma-7b](https://build.nvidia.com/google/gemma-7b) +* [google/codegemma-7b](https://build.nvidia.com/google/codegemma-7b) + +## Creating the default model + +There is no default model for Completions. You can create any supported model using the `aidb.create_model` function. + +## Creating an OpenAI model + +You can create any supported OpenAI model using the `aidb.create_model` function. + +In this example, we are creating a GPT-4o model with the name `my_openai_model`: + +```sql +SELECT aidb.create_model( + 'my_openai_model', + 'openai_completions', + '{"model": "gpt-4o"}'::JSONB, + '{"api_key": "sk-abc123xyz456def789ghi012jkl345mn"}'::JSONB +); +``` + +## Creating a NIM model + +```sql +SELECT aidb.create_model( + 'my_nim_completions', + 'nim_completions', + '{"model": "meta/llama-3.2-1b-instruct"}'::JSONB, + credentials=>'{"api_key": "sk-abc123xyz456def789ghi012jkl345mn"'::JSONB); +``` + +## Model configuration settings + +The following configuration settings are available for OpenAI models: + +* `model` - The model to use. +* `url` - The URL of the model to use. This is optional and can be used to specify a custom model URL. + * If `openai_completions` (or `completions`) is the `model`, `url` defaults to `https://api.openai.com/v1/chat/completions`. + * If `nim_completions` is the `model`, `url` defaults to `https://integrate.api.nvidia.com/v1/chat/completions`. +* `max_concurrent_requests` - The maximum number of concurrent requests to make to the OpenAI model. Defaults to `25`. + +## Model credentials + +The following credentials are required for these models: + +* `api_key` - The API key to use for authentication. diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/openai-embeddings.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/embeddings.mdx similarity index 55% rename from advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/openai-embeddings.mdx rename to advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/embeddings.mdx index 4a18cdd522d..28d0cbacfa6 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/openai-embeddings.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/embeddings.mdx @@ -1,16 +1,25 @@ --- -title: "OpenAI Embeddings" -navTitle: "OpenAI Embeddings" -description: "OpenAI Embeddings is a text embedding model that enables use of any OpenAI text embedding model." +title: "Embeddings" +navTitle: "Embeddings" +description: "Embeddings is a text embedding model that enables use of any OpenAI API compatible text embedding model." --- -Model name: `openai_embeddings` +Model name: `embeddings` -## About OpenAI Embeddings +Model aliases: -OpenAI Embeddings is a text embedding model that enables use of any supported OpenAI text embedding model. It is suitable for text classification, clustering, and other text embedding tasks. +* `openai_embeddings` +* `nim_embeddings` -See a list of supported OpenAI models [here](https://platform.openai.com/docs/guides/embeddings#embedding-models). +## About Embeddings + +OpenAI Embeddings is a text embedding model that enables use of any OpenAI API complatible text embedding model. It is suitable for text classification, clustering, and other text embedding tasks. + +Depending on the name of the model, the model provider will set defaults accordingly. + +When invoked as `embeddings` or `openai_embeddings`, the model provider will default to using the OpenAI API. + +When invoked as `nim_embeddings`, the model provider will default to using the NVIDIA NIM API. ## Supported aidb operations @@ -19,10 +28,18 @@ See a list of supported OpenAI models [here](https://platform.openai.com/docs/gu ## Supported models -* Any text embedding model that is supported by OpenAI. This includes `text-embedding-3-small`, `text-embedding-3-large`, and `text-embedding-ada-002`. +* Any text embedding model that is supported by the provider. + +### Supported OpenAI models + +* Any text embedding model that is supported by OpenAI. This includes `text-embedding-3-small`, `text-embedding-3-large`, and `text-embedding-ada-002`. See a list of supported OpenAI models [here](https://platform.openai.com/docs/guides/embeddings#embedding-models). * Defaults to `text-embedding-3-small`. -## Creating the default model +### Supported NIM models + +* [nvidia/nv-embedqa-e5-v5](https://build.nvidia.com/nvidia/nv-embedqa-e5-v5) (default) + +## Creating the default with OpenAI model ```sql SELECT aidb.create_model('my_openai_embeddings', @@ -52,23 +69,11 @@ Because we are passing the configuration options and the credentials, unlike the The following configuration settings are available for OpenAI models: * `model` - The OpenAI model to use. -* `url` - The URL of the OpenAI model to use. This is optional and can be used to specify a custom model URL. Defaults to `https://api.openai.com/v1/chat/completions`. +* `url` - The URL of the model to use. This is optional and can be used to specify a custom model URL. + * If `openai_completions` (or `completions`) is the `model`, `url` defaults to `https://api.openai.com/v1/chat/completions`. + * If `nim_completions` is the `model`, `url` defaults to `https://integrate.api.nvidia.com/v1/chat/completions`. * `max_concurrent_requests` - The maximum number of concurrent requests to make to the OpenAI model. Defaults to `25`. -## Available OpenAI Embeddings models - -* sentence-transformers/all-MiniLM-L6-v2 (default) -* sentence-transformers/all-MiniLM-L6-v1 -* sentence-transformers/all-MiniLM-L12-v1 -* sentence-transformers/msmarco-bert-base-dot-v5 -* sentence-transformers/multi-qa-MiniLM-L6-dot-v1 -* sentence-transformers/paraphrase-TinyBERT-L6-v2 -* sentence-transformers/all-distilroberta-v1 -* sentence-transformers/all-MiniLM-L6-v2 -* sentence-transformers/multi-qa-MiniLM-L6-cos-v1 -* sentence-transformers/paraphrase-multilingual-mpnet-base-v2 -* sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 - ## Model credentials The following credentials are required for OpenAI models: diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/index.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/index.mdx index 59b628aaf42..5b3aa6eb68c 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/index.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/index.mdx @@ -12,8 +12,11 @@ navigation: This section provides details of the supported models in EDB Postgres AI - AI Accelerator - Pipelines and their capabilities. -* [T5](t5) -* [OpenAI Embeddings](openai-embeddings) -* [OpenAI Completions](openai-completions) -* [BERT](bert) -* [CLIP](clip) +* [T5](t5). +* [Embeddings](embeddings), including openai-embeddings and nim-embeddings. +* [Completions](completions), including openai-completions and nim-completions. +* [BERT](bert). +* [CLIP](clip). +* [NIM_CLIP](nim_clip). +* [NIM_RERANKING](nim_reranking). + diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/nim_clip.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/nim_clip.mdx new file mode 100644 index 00000000000..c872e1211c8 --- /dev/null +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/nim_clip.mdx @@ -0,0 +1,54 @@ +--- +title: "CLIP" +navTitle: "CLIP" +description: "CLIP (Contrastive Language-Image Pre-training) is a model that learns visual concepts from natural language supervision." +--- + +Model name: `nim_clip` + +## About CLIP + +CLIP (Contrastive Language-Image Pre-training) is a model that learns visual concepts from natural language supervision. It is a zero-shot learning model that can be used for a wide range of vision and language tasks. + +This specific model runs on NVIDIA NIM. More information about CLIP on NIM can be found [here](https://build.nvidia.com/nvidia/nvclip). + + +## Supported aidb operations + +* encode_text +* encode_text_batch +* encode_image +* encode_image_batch + +## Supported models + +### NVIDIA NGC + +* nvidia/nvclip (default) + + +## Creating the default model + +```sql +SELECT aidb.create_model( + 'my_nim_clip_model', + 'nim_clip', + credentials=>'{"api_key": ""'::JSONB +); +``` + +There is only one model, the default `nvidia/nvclip`, so we do not need to specify the model in the configuration. + +## Model configuration settings + +The following configuration settings are available for CLIP models: + +* `model` - The NIM model to use. The default is `nvidia/nvclip` and is the only model available. +* `url` - The URL of the model to use. This is optional and can be used to specify a custom model URL. Defaults to `https://integrate.api.nvidia.com/v1/embeddings`. +* `dimensions` - Model output vector size, defaults to 1024 + +## Model credentials + +The following credentials are required if executing inside NVIDIA NGC: + +* `api_key` - The NVIDIA Cloud API key to use for authentication. diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/nim_reranking.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/nim_reranking.mdx new file mode 100644 index 00000000000..3380a453c82 --- /dev/null +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/nim_reranking.mdx @@ -0,0 +1,48 @@ +--- +title: "Reranking (NIM)" +navTitle: "reranking" +description: "Reranking is a method in text search that sorts results by relevance to make them more accurate." +--- + +Model name: `nim_reranking` + +## About Reranking + +Reranking is a method in text search that sorts results by relevance to make them more accurate. It gives scores to documents using cross-attention mechanisms, improving the initial search results. + +## Supported aidb operations + +* rerank_text + +## Supported models + +### NVIDIA NGC + +* nvidia/llama-3.2-nv-rerankqa-1b-v2 (default) + + + +## Creating the default model + +```sql +SELECT aidb.create_model( + 'my_nim_reranker', + 'nim_reranking', + credentials=>'{"api_key": ""'::JSONB +); +``` + +There is only one model, the default `nvidia/nvclip`, so we do not need to specify the model in the configuration. + +## Model configuration settings + +The following configuration settings are available for CLIP models: + +* `model` - The NIM model to use. The default is `nvidia/llama-3.2-nv-rerankqa-1b-v2` and is the only model available. +* `url` - The URL of the model to use. This is optional and can be used to specify a custom model URL. Defaults to `https://ai.api.nvidia.com/v1/retrieval`. + +## Model credentials + +The following credentials are required if executing inside NVIDIA NGC: + +* `api_key` - The NVIDIA Cloud API key to use for authentication. diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/openai-completions.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/openai-completions.mdx deleted file mode 100644 index fbf672d710b..00000000000 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/supported-models/openai-completions.mdx +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: "OpenAI Completions" -navTitle: "OpenAI Completions" -description: "OpenAI Completions is a text completion model that enables use of any OpenAI text generation model." ---- - -Model name: `openai_completions` - -## About OpenAI Completions - -OpenAI Completions is a text completion model that enables use of any supported OpenAI text generation model. It is suitable for chat/text transforms, text completion, and other text generation tasks. - -See a list of supported OpenAI models [here](https://platform.openai.com/docs/models#models-overview). - -## Supported aidb operations - -* decode_text -* decode_text_batch - -## Supported models - -* Any text generation model that is supported by OpenAI. This includes models such as GPT-4o, GPT-4o mini, GPT-4 and GPT-3.5. - -## Creating the default model - -There is no default model for OpenAI Completions. You can create any supported OpenAI model using the `aidb.create_model` function. See [Creating a model](#creating-a-specific-model). - -## Creating a specific model - -You can create any supported OpenAI model using the `aidb.create_model` function. - -In this example, we are creating a GPT-4o model with the name `my_openai_model`: - -```sql -SELECT aidb.create_model( - 'my_openai_model', - 'openai_completions', - '{"model": "gpt-4o"}'::JSONB, - '{"api_key": "sk-abc123xyz456def789ghi012jkl345mn"}'::JSONB -); -``` - -## Model configuration settings - -The following configuration settings are available for OpenAI models: - -* `model` - The OpenAI model to use. -* `url` - The URL of the OpenAI model to use. This is optional and can be used to specify a custom model URL. Defaults to `https://api.openai.com/v1/chat/completions`. -* `max_concurrent_requests` - The maximum number of concurrent requests to make to the OpenAI model. Defaults to `25`. - -## Model credentials - -The following credentials are required for OpenAI models: - -* `api_key` - The OpenAI API key to use for authentication. - diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/using-models.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/using-models.mdx index d172956444c..b27ec20db49 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/models/using-models.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/models/using-models.mdx @@ -49,11 +49,18 @@ __OUTPUT__ server_name | server_options --------------------+---------------- t5_local | + embeddings | + completions | openai_embeddings | openai_completions | + nim_completions | + nim_embeddings | + nim_clip | + nim_reranking | bert_local | clip_local | dummy | +(12 rows) ``` This will return a list of all the model providers that are currently available in the system. You can find out more about these providers and their capabilities in the [Supported Models](./supported-models) section. @@ -73,7 +80,7 @@ This will create a model named `my_model` that uses the `bert_local` model provi ## Creating a Model with Configuration and Credentials -This is where the other [supported models](./supported-models) come in. You can create a different model by specifying the model name in the configuration. The `OpenAI Completions` and `OpenAI Embeddings` models are both models which you can create to make use of OpenAI's completions and embeddings APIs. +This is where the other [supported models](./supported-models) come in. You can create a different model by specifying the model name in the configuration. The `openai-completions` and `openai-embeddings` models are both models which you can create to make use of OpenAI's completions and embeddings APIs. Similarly the `nim-completions` and `nim-embeddings` models are models which you can create to make use of NVIDIA's completions and embeddings APIs. You need to provide more information to the `aidb.create_model` function when creating a model like this. Completions has a number of options, including selecting which model it will use on OpenAI. Both Completions and Embeddings require API credentials. Here is an example of how to create the OpenAI Completions model: @@ -101,9 +108,24 @@ SELECT aidb.create_model( This will create the `text-embedding-3-large` model with the name `my_openai_embeddings`. You can now use this model in your Pipelines functions to generate embeddings for text data. -## Using models with OpenAI compatible APIs +Where models do use credentials, the credentials set in the first use of create model for the model provider will be used with all subsequent uses of that model. It is not possible to use different credentia;s for different models that use the same provider. + +If you need to change the credentials, you can use the `replace_credentials` option when creating a new model that updates the credentials for the model provider. -These OpenAI models work with any OpenAI compatible API. This allows you to connect and use an even wider range of models, just by passing the appropriate API endpoint to the `url` option in the `aidb.create_model` function's options. +```sql +SELECT aidb.create_model( + 'my_new_openai_model', + 'openai_completions', + '{"model": "gpt-4o"}'::JSONB, + '{"api_key": "sk-ngl234meh789ski1111bid011i"}'::JSONB, + replace_credentials => true + ); +``` + +You can delete the new model with `SELECT aidb.delete_model('my_new_openai_model')` if you only needed to change the credentials. + +## Using models with OpenAI compatible APIs -For more information about the OpenAI models, see the [OpenAI Completions](./supported-models/openai-completions) and [OpenAI Embeddings](./supported-models/openai-embeddings) pages. +The `completions` and `embeddings` models work with any OpenAI compatible API. This allows you to connect and use an even wider range of models, just by passing the appropriate API endpoint to the `url` option in the `aidb.create_model` function's options. +For more information about the models, see the [Completions](./supported-models/completions) and [Embeddings](./supported-models/embeddings) pages. diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/index.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/index.mdx index 36b66ab7bd4..0a13ddfcbdf 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/index.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/index.mdx @@ -20,6 +20,12 @@ navigation: * [aidb.list_models](models#aidblist_models) * [aidb.get_model](models#aidbget_model) * [aidb.delete_model](models#aidbdelete_model) +* [aidb.encode_text](models#aidbencode_text) +* [aidb.encode_text_batch](models#aidbencode_text_batch) +* [aidb.decode_text](models#aidbdecode_text) +* [aidb.decode_text_batch](models#aidbdecode_text_batch) +* [aidb.encode_image](models#aidbencode_image) +* [aidb.rerank_text](models#aidbrerank_text) ## Retrievers diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/models.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/models.mdx index c830f065e85..b605bb7030d 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/models.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/reference/models.mdx @@ -27,12 +27,13 @@ Creates a new model in the system by saving its name, provider and optional conf #### Parameters -| Parameter | Type | Default | Description | -|---------------|-------|-------------|----------------------------------------------------------------------------------------| -| `name` | text | | User defined name for the model. | -| `provider` | text | | Name of the model provider (as found in [aidb.model_providers](#aidbmodel_providers)). | -| `config` | jsonb | '{}'::jsonb | Optional configuration for the model provider. | -| `credentials` | jsonb | '{}'::jsonb | Optional credentials for the model provider. | +| Parameter | Type | Default | Description | +|-----------------------|---------|-------------|-------------------------------------------------------------------------------------------------------------| +| `name` | text | | User defined name for the model. | +| `provider` | text | | Name of the model provider (as found in [aidb.model_providers](#aidbmodel_providers)). | +| `config` | jsonb | '{}'::jsonb | Optional configuration for the model provider. | +| `credentials` | jsonb | '{}'::jsonb | Optional credentials for the model provider. | +| `replace_credentials` | boolean | false | If true, replace the credentials for the model provider. If false, the credentials will not be overwritten. | #### Example @@ -52,6 +53,19 @@ or equivalently, using default values: SELECT aidb.create_model('my_t5', 't5_local'); ``` +or if updating the credentials of a model's provider, which has already been created. + +```sql +SELECT aidb.create_model( + name => 'my_t5'::text, + provider => 't5_local'::character varying, + config => '{"param1": "value1", "param2": "value2"}'::jsonb, + credentials => '{"token": "abcd"}'::jsonb, + replace_credentials => true + ); +``` + + ### `aidb.list_models` Returns a list of all models in the registry and their configured options. @@ -210,3 +224,20 @@ Encodes an image using a model, generating a vector representation of a given im |--------------|------|-------------------| | `encode_image` | bytea | The encoded image. | +### `aidb.rerank_text` + +Reranks text using a model, generating a vector representation of a given text input. + +#### Parameters + +| Parameter | Type | Default | Description | +|--------------|------------------|---------|-----------------------------------| +| `model_name` | text | | Name of the model to rerank with. | `text` | text | | Text to rerank. | +| `inputs` | strings\[\] | \[\] | Inputs for the model provider. | + +#### Returns + +| Column | Type | Description | +|---------------|----------------------|----------------------------| +| `rerank_text` | double precision\[\] | Array of reranking logits. | + diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.0.0_rel_notes.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.0.0_rel_notes.mdx index 5e960ef91de..85d2b620bc4 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.0.0_rel_notes.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.0.0_rel_notes.mdx @@ -15,7 +15,7 @@ Updating the GA release of EDB Postgres AI - AI Accelerator - Pipelines, in resp
DescriptionAddresses
Renaming of functions/arguments

Management functions move to use create rather than register and delete rather than drop. -Function argument names lose the preceding `p_`` to be consistent.

+Function argument names lose the preceding p_ to be consistent.

diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.1.1_rel_notes.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.1.1_rel_notes.mdx new file mode 100644 index 00000000000..76d5e023f4e --- /dev/null +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/ai-accelerator_2.1.1_rel_notes.mdx @@ -0,0 +1,30 @@ +--- +title: AI Accelerator - Pipelines 2.1.1 release notes +navTitle: Version 2.1.1 +--- + +Released: 3 February 2025 + +In this release, we add support for Nvida NIM, introduce new model names, and improve the retriever pipeline. + +## Highlights + +- Support for Nvidia NIM added. +- `embeddings` and `completions` are new model names. +- Reranking using NIM is now available. +- Source tables in retriever pipelines now support schemas. + +## Enhancements + + + + + + +
DescriptionAddresses
Renamed openai_embedding and openai_completion

The model names openai_embedding and openai_completion have been renamed to embeddings and completions respectively. The old names are still supported for backward compatibility.

+
Improved model provider credential management

Improve model provider credential management in the create_model() call. New credentials no longer get silently ignored if credentials already exist.

+
Added handler for the FDW (foreign data wrappers) used for the model registry

The handler has no functionality but it satisfies the FDW handler interface. This avoids certain issues with PG system calls that happen when FDWs don't have any handlers.

+
Added schema support / fully qualified identifiers to the retriever pipeline.

For retrievers with table sources, the source table and vector table can now be in any schema in the PG database. The schema can either be passed during retriever creation (fully qualified identifier) or can be omitted. If the schema is omitted, we resolve and store the applicable schema.

+
+ + diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/index.mdx b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/index.mdx index e3daad74bea..a906a73002b 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/index.mdx +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/index.mdx @@ -4,6 +4,7 @@ navTitle: Release notes description: Release notes for EDB Postgres AI - AI Accelerator indexCards: none navigation: + - ai-accelerator_2.1.1_rel_notes - ai-accelerator_2.0.0_rel_notes - ai-accelerator_1.0.7_rel_notes --- @@ -14,5 +15,6 @@ The EDB Postgres AI - AI Accelerator describes the latest version of AI Accelera | AI Accelerator version | Release Date | |---|---| +| [2.1.1](./ai-accelerator_2.1.1_rel_notes) | 03 Feb 2025 | | [2.0.0](./ai-accelerator_2.0.0_rel_notes) | 13 Jan 2025 | | [1.0.7](./ai-accelerator_1.0.7_rel_notes) | 10 Dec 2024 | diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.0.0.yml b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.0.0.yml index 964bec128ba..5ed614f953d 100644 --- a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.0.0.yml +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.0.0.yml @@ -9,7 +9,7 @@ relnotes: - relnote: Renaming of functions/arguments details: | Management functions move to use `create` rather than `register` and `delete` rather than `drop`. - Function argument names lose the preceding `p_`` to be consistent. + Function argument names lose the preceding `p_` to be consistent. jira: AID-213 addresses: "" type: Enhancement diff --git a/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.1.1.yml b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.1.1.yml new file mode 100644 index 00000000000..fed567fd319 --- /dev/null +++ b/advocacy_docs/edb-postgres-ai/ai-accelerator/rel_notes/src/rel_notes_2.1.1.yml @@ -0,0 +1,42 @@ +product: AI Accelerator - Pipelines +version: 2.1.1 +date: 3 February 2025 +intro: | + In this release, we add support for Nvida NIM, introduce new model names, and improve the retriever pipeline. +highlights: | + - Support for Nvidia NIM added. + - `embeddings` and `completions` are new model names. + - Reranking using NIM is now available. + - Source tables in retriever pipelines now support schemas. +relnotes: +- relnote: Renamed openai_embedding and openai_completion + details: | + The model names `openai_embedding` and `openai_completion` have been renamed to `embeddings` and `completions` respectively. The old names are still supported for backward compatibility. + jira: "" + addresses: "" + type: Enhancement + impact: High +- relnote: Improved model provider credential management + details: | + Improve model provider credential management in the create_model() call. New credentials no longer get silently ignored if credentials already exist. + jira: "AID-275" + addresses: "" + type: Enhancement + impact: High +- relnote: Added handler for the FDW (foreign data wrappers) used for the model registry + details: | + The handler has no functionality but it satisfies the FDW handler interface. This avoids certain issues with PG system calls that happen when FDWs don't have any handlers. + jira: "AID-166" + addresses: "" + type: Enhancement + impact: High +- relnote: Added schema support / fully qualified identifiers to the retriever pipeline. + details: | + For retrievers with table sources, the source table and vector table can now be in any schema in the PG database. The schema can either be passed during retriever creation (fully qualified identifier) or can be omitted. If the schema is omitted, we resolve and store the applicable schema. + jira: "AID-217" + addresses: "" + type: Enhancement + impact: High + + + diff --git a/product_docs/docs/epas/13/epas_guide/14_edb_clone_schema.mdx b/product_docs/docs/epas/13/epas_guide/14_edb_clone_schema.mdx index 838840686b9..59c7d012aa7 100644 --- a/product_docs/docs/epas/13/epas_guide/14_edb_clone_schema.mdx +++ b/product_docs/docs/epas/13/epas_guide/14_edb_clone_schema.mdx @@ -21,8 +21,8 @@ Use the following functions with EDB Clone Schema: - **process_status_from_log.** This function displays the status of the cloning functions. The information is obtained from a log file that must be specified when a cloning function is invoked. See [process_status_from_log](#process_status_from_log) for information on the `process_status_from_log` function. - **remove_log_file_and_job.** This function deletes the log file created by a cloning function. This function can also be used to delete a job created by the non-blocking form of the function. See [remove_log_file_and_job](#remove_log_file_and_job) for information on the `remove_log_file_and_job` function. - **create_clone_log_dir.** This function creates a directory to store all the log files. -- **grant_clone_schema_privileges.** This function grants the privileges to a non-super user to clone the schema. -- **revoke_clone_schema_privileges.** This function revokes the privileges from a non-super user for cloning the schema. +- **grant_clone_schema_privileges.** This function grants the privileges to clone the schema to a non-superuser. +- **revoke_clone_schema_privileges.** This function revokes the privileges to clone the schema from a non-superuser. The database objects that can be cloned from one schema to another are the following: @@ -85,7 +85,7 @@ The following describes the steps to install the required extensions and the PL/ ```sql SELECT edb_util.create_clone_log_dir(); ``` -It returns the value true on successful execution. +When successful, the command returns `true`. **Step 2:** The following extensions must be installed on the database: @@ -105,7 +105,7 @@ CREATE EXTENSION adminpack; CREATE EXTENSION pgagent; ``` -For more information, see [CREATE EXTENSION command documentation](https://www.postgresql.org/docs/current/static/sql-createextension.html). +For more information, see the [CREATE EXTENSION command documentation](https://www.postgresql.org/docs/current/static/sql-createextension.html). **Step 3:** Modify the `postgresql.conf` file. @@ -115,7 +115,7 @@ Modify the `postgresql.conf` file by adding `$libdir/parallel_clone` to the `sha shared_preload_libraries = '$libdir/dbms_pipe,$libdir/dbms_aq,$libdir/parallel_clone' ``` -Restart the database server to load the libraries with clone schema support. +To load the libraries with clone schema support, restart the database server. **Step 4:** The Perl Procedural Language (PL/Perl) must be installed on the database and the `CREATE TRUSTED LANGUAGE plperl` command must be run. For Linux, install PL/Perl using the `edb-asxx-server-plperl` RPM package where `xx` is the Advanced Server version number. For Windows, use the EDB Postgres Language Pack. For information, see [EDB Language Pack documentation](/language_pack/latest/). @@ -201,13 +201,13 @@ Make sure you create the `parallel_clone` extension before creating the `edb_clo The Log directory is required to store all the log files. -After creating the extensions the following statement must be executed, as a superuser, to create the log directory: +After creating the extensions, to create the log directory, execute the following statement as a superuser: ```sql SELECT edb_util.create_clone_log_dir(); ``` -It will return the value true on successful execution. +When successful, the command returns `true`. ### Creating the Foreign Servers and User Mappings @@ -233,7 +233,7 @@ The user mapping defines the connection and authentication information for the f **This foreign server and user mapping must be created within the database of the local server in which the cloning is to occur.** -**The database user for whom the user mapping is defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function.** +**When invoking an EDB Clone Schema function, the database user for whom the user mapping is defined must have the required privileges and be connected to the local server.** The following example creates the foreign server for the database containing the schema to be cloned, and to receive the cloned schema as well. @@ -307,9 +307,9 @@ The user mappings define the connection and authentication information for the f **All of these foreign servers and user mappings must be created within the target database of the target/local server.** -**The database user for whom the user mappings are defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function.** +**When invoking an EDB Clone Schema function, the database user for whom the user mappings are defined must have the required privileges and be connected to the local server.** -The following example creates the foreign server for the local, target database that is to receive the cloned schema. +The following example creates the foreign server for the local target database that is to receive the cloned schema. ```text CREATE SERVER tgt_server FOREIGN DATA WRAPPER postgres_fdw @@ -1106,16 +1106,16 @@ tgtdb=# SELECT edb_util.remove_log_file_and_job ('clone_rmt_src_tgt',2); (1 row) ``` -## Cloning schema as a non-super user +## Cloning schema as a non-superuser -You can now clone the schema as a non-super user. These two functions are created while creating the extension: +You can clone the schema as a non-superuser. These two functions are created while creating the extension: -- GRANT_CLONE_SCHEMA_PRIVILEGES - Grants the privileges to a non-super user to clone the schema. -- REVOKE_CLONE_SCHEMA_PRIVILEGES - Revokes the privileges from a non-super user for cloning the schema. +- `GRANT_CLONE_SCHEMA_PRIVILEGES` — Grants the privileges to clone the schema to a non-superuser. +- `REVOKE_CLONE_SCHEMA_PRIVILEGES` — Revokes the privileges to clone the schema from a non-superuser. ### GRANT_CLONE_SCHEMA_PRIVILEGES -You can grant the clone schema privileges to a non-super user using this function. +This function grants the clone schema privileges to a non-superuser. Syntax: @@ -1123,21 +1123,19 @@ Syntax: GRANT_CLONE_SCHEMA_PRIVILEGES( TEXT, [ BOOLEAN], [ BOOLEAN]) ``` -Where, - `user_name` -Name of the user to whom privileges are to be granted to do local cloning. +Name of the user to grant local cloning privileges to. `allow_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value grants user the privileges to do remote cloning. +Optionally, provide a Boolean value to this parameter to control remote cloning by the user. By default, the value is `false`. The `true` value grants the user the privileges to do remote cloning. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default, the value is `false`. The `true` value prints the executed commands on the terminal. -This example shows how to grant a non-super user ec2-user the privileges for local and remote cloning: +This example shows how to grant a non-superuser ec2-user the privileges for local and remote cloning: ```sql SELECT edb_util.grant_clone_schema(user_name => 'ec2-user', @@ -1165,7 +1163,7 @@ INFO: Executed command: GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO "ec ### REVOKE_CLONE_SCHEMA_PRIVILEGES -You can revoke the clone schema privileges from a non-super user using this function. +This function revokes the clone schema privileges from a non-superuser. Syntax: @@ -1173,19 +1171,17 @@ Syntax: revoke_clone_schema_privileges( TEXT[, BOOLEAN][, BOOLEAN]) ``` -Where, - `user_name` -Name of the user from whom we want to revoke the cloning privileges. +Name of the user to revoke the cloning privileges from. `revoke_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value revokes the remote cloning privileges from the user. +Optionally, provide a Boolean value to this parameter to control the remote cloning by the user. By default, the value is `false`. The `true` value revokes the remote cloning privileges from the user. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default the value is `false`. The `true` value prints the executed commands on the terminal. This example shows how to revoke cloning privileges from the ec2-user user. @@ -1213,11 +1209,9 @@ INFO: Revoked USAGE on foreign data wrapper postgres_fdw from ec2-user. (1 row) ``` -### Example - clone a schema locally as a non-super user +### Example: Clone a schema locally as a non-superuser -This example shows how to clone a local schema as a non-super user: - -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs PASSWORD `abc123`; @@ -1225,7 +1219,7 @@ __OUTPUT__ CREATE ROLE ``` -Give CREATE privileges to `forcs` user on `edb` database: +Give CREATE privileges on the `edb` database to `forcs`: ```sql GRANT CREATE on DATABASE edb to forcs; @@ -1262,7 +1256,7 @@ __OUTPUT__ (1 row) ``` -Give clone schema privilege to `forcs` user: +Give the clone schema privilege to `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -1285,7 +1279,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to `edb` datbase as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 6543 -U forcs edb @@ -1334,11 +1328,9 @@ __OUTPUT__ (1 row) ``` -### Example - clone a schema remotely as a non-super user - -This example shows how to clone a schema remotely as a non-super user. +### Example: Clone a schema remotely as a non-superuser -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs password `abc123`; @@ -1375,7 +1367,7 @@ __OUTPUT__ (1 row) ``` -Give the clone schema privileges to the non-super user `forcs`: +Give the clone schema privileges to the non-superuser `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -1398,7 +1390,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to the `edb` database as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 4422 -U forcs edb @@ -1418,7 +1410,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Create a foregin server and user mapping in the source database: +Create a foreign server and user mapping in the source database: ```sql CREATE SERVER src_postgres_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host '127.0.0.1', port '6543', dbname 'edb'); @@ -1428,7 +1420,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Clone the schema from source to target database using `remotecopyschema` function: +Clone the schema from source to target database using the `remotecopyschema` function: ```sql select edb_util.remotecopyschema('src_postgres_server','local_postgres_server','src','src','src_log',true,true,true,4); diff --git a/product_docs/docs/epas/14/epas_guide/14_edb_clone_schema.mdx b/product_docs/docs/epas/14/epas_guide/14_edb_clone_schema.mdx index a654df1a90f..3af9af8bc63 100644 --- a/product_docs/docs/epas/14/epas_guide/14_edb_clone_schema.mdx +++ b/product_docs/docs/epas/14/epas_guide/14_edb_clone_schema.mdx @@ -21,8 +21,8 @@ Use the following functions with EDB Clone Schema: - `process_status_from_log`. This function displays the status of the cloning functions. The information is obtained from a log file you specify when invoking a cloning function. See [process_status_from_log](#process_status_from_log) for more information. - `remove_log_file_and_job`. This function deletes the log file created by a cloning function. You can also use this function to delete a job created by the non-blocking form of the function. See [remove_log_file_and_job](#remove_log_file_and_job) for more information. - `create_clone_log_dir`. This function creates a directory to store all the log files created by a cloning function. -- `grant_clone_schema_privileges`. This function grants the privileges to a non-super user for cloning the schema. -- `revoke_clone_schema_privileges`. This function revokes the privileges from a non-super user for cloning the schema. +- `grant_clone_schema_privileges`. This function grants the privileges to clone the schema to a non-superuser. +- `revoke_clone_schema_privileges`. This function revokes the privileges to clone the schema from a non-superuser. You can clone these database objects from one schema to another: @@ -82,7 +82,7 @@ Perform this installation on any database to be used as the source or target dat ```sql SELECT edb_util.create_clone_log_dir(); ``` -It returns the value true on successful execution. +When successful, the command returns `true`. 1. Install the following extensions on the database: @@ -199,7 +199,7 @@ For the `localcopyschema` and `localcopyschema_nb` functions, the source and tar The user mapping defines the connection and authentication information for the foreign server. You must create this foreign server and user mapping in the database of the local server in which the cloning occurs. -The database user for whom the user mapping is defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function. +When invoking an EDB Clone Schema function, the database user for whom the user mapping is defined must have the required privileges and be connected to the local server. This example creates the foreign server for the database containing the schema to clone and to receive the cloned schema: @@ -269,9 +269,9 @@ The user mappings define the connection and authentication information for the f You must create all of these foreign servers and user mappings in the target database of the target/local server. -The database user for whom the user mappings are defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function. +When invoking an EDB Clone Schema function, the database user for whom the user mappings are defined must have the required privileges and be connected to the local server. -This example creates the foreign server for the local, target database that receives the cloned schema: +This example creates the foreign server for the local target database that receives the cloned schema: ```text CREATE SERVER tgt_server FOREIGN DATA WRAPPER postgres_fdw @@ -1064,16 +1064,16 @@ tgtdb=# SELECT edb_util.remove_log_file_and_job ('clone_rmt_src_tgt',2); (1 row) ``` -## Cloning schema as a non-super user +## Cloning schema as a non-superuser -You can now clone the schema as a non-super user. These two functions are created while creating the extension: +You can clone the schema as a non-superuser. These two functions are created while creating the extension: -- GRANT_CLONE_SCHEMA_PRIVILEGES - Grants the privileges to a non-super user to clone the schema. -- REVOKE_CLONE_SCHEMA_PRIVILEGES - Revokes the privileges from a non-super user for cloning the schema. +- `GRANT_CLONE_SCHEMA_PRIVILEGES` — Grants the privileges to clone the schema to a non-superuser. +- `REVOKE_CLONE_SCHEMA_PRIVILEGES` — Revokes the privileges to clone the schema from a non-superuser. ### GRANT_CLONE_SCHEMA_PRIVILEGES -You can grant the clone schema privileges to a non-super user using this function. +This function grants the clone schema privileges to a non-superuser. Syntax: @@ -1081,21 +1081,19 @@ Syntax: GRANT_CLONE_SCHEMA_PRIVILEGES( TEXT, [ BOOLEAN], [ BOOLEAN]) ``` -Where, - `user_name` -Name of the user to whom privileges are to be granted to do local cloning. +Name of the user to grant local cloning privileges to. `allow_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value grants user the privileges to do remote cloning. +Optionally, provide a Boolean value to this parameter to control remote cloning by the user. By default, the value is `false`. The `true` value grants the user the privileges to do remote cloning. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default, the value is `false`. The `true` value prints the executed commands on the terminal. -This example shows how to grant a non-super user ec2-user the privileges for local and remote cloning: +This example shows how to grant a non-superuser ec2-user the privileges for local and remote cloning: ```sql SELECT edb_util.grant_clone_schema(user_name => 'ec2-user', @@ -1123,7 +1121,7 @@ INFO: Executed command: GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO "ec ### REVOKE_CLONE_SCHEMA_PRIVILEGES -You can revoke the clone schema privileges from a non-super user using this function. +This function revokes the clone schema privileges from a non-superuser. Syntax: @@ -1131,19 +1129,17 @@ Syntax: revoke_clone_schema_privileges( TEXT[, BOOLEAN][, BOOLEAN]) ``` -Where, - `user_name` -Name of the user from whom we want to revoke the cloning privileges. +Name of the user to revoke the cloning privileges from. `revoke_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value revokes the remote cloning privileges from the user. +Optionally, provide a Boolean value to this parameter to control the remote cloning by the user. By default, the value is `false`. The `true` value revokes the remote cloning privileges from the user. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default the value is `false`. The `true` value prints the executed commands on the terminal. This example shows how to revoke cloning privileges from the ec2-user user. @@ -1171,11 +1167,9 @@ INFO: Revoked USAGE on foreign data wrapper postgres_fdw from ec2-user. (1 row) ``` -### Example - clone a schema locally as a non-super user - -This example shows how to clone a local schema as a non-super user: +### Example: Clone a schema locally as a non-superuser -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs PASSWORD `abc123`; @@ -1183,7 +1177,7 @@ __OUTPUT__ CREATE ROLE ``` -Give CREATE privileges to `forcs` user on `edb` database: +Give CREATE privileges on the `edb` database to `forcs`: ```sql GRANT CREATE on DATABASE edb to forcs; @@ -1220,7 +1214,7 @@ __OUTPUT__ (1 row) ``` -Give clone schema privilege to `forcs` user: +Give the clone schema privilege to `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -1243,7 +1237,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to `edb` datbase as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 6543 -U forcs edb @@ -1292,11 +1286,9 @@ __OUTPUT__ (1 row) ``` -### Example - clone a schema remotely as a non-super user +### Example: Clone a schema remotely as a non-superuser -This example shows how to clone a schema remotely as a non-super user. - -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs password `abc123`; @@ -1333,7 +1325,7 @@ __OUTPUT__ (1 row) ``` -Give the clone schema privileges to the non-super user `forcs`: +Give the clone schema privileges to the non-superuser `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -1356,7 +1348,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to the `edb` database as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 4422 -U forcs edb @@ -1376,7 +1368,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Create a foregin server and user mapping in the source database: +Create a foreign server and user mapping in the source database: ```sql CREATE SERVER src_postgres_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host '127.0.0.1', port '6543', dbname 'edb'); @@ -1386,7 +1378,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Clone the schema from source to target database using `remotecopyschema` function: +Clone the schema from source to target database using the `remotecopyschema` function: ```sql select edb_util.remotecopyschema('src_postgres_server','local_postgres_server','src','src','src_log',true,true,true,4); @@ -1396,4 +1388,3 @@ __OUTPUT__ t (1 row) ``` - diff --git a/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx b/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx index f57ea082cb5..84f65de90df 100644 --- a/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx +++ b/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx @@ -1,15 +1,16 @@ --- -title: Cloning schema as a non-super user +title: Cloning schema as a non-superuser --- -You can now clone the schema as a non-super user. These two functions are created while creating the extension: +You can clone the schema as a non-superuser. These two functions are created while creating the extension: -- GRANT_CLONE_SCHEMA_PRIVILEGES - Grants the privileges to a non-super user to clone the schema. -- REVOKE_CLONE_SCHEMA_PRIVILEGES - Revokes the privileges from a non-super user for cloning the schema. -## GRANT_CLONE_SCHEMA_PRIVILEGES +- `GRANT_CLONE_SCHEMA_PRIVILEGES` — Grants the privileges to clone the schema to a non-superuser. +- `REVOKE_CLONE_SCHEMA_PRIVILEGES` — Revokes the privileges to clone the schema from a non-superuser. -You can grant the clone schema privileges to a non-super user using this function. +### GRANT_CLONE_SCHEMA_PRIVILEGES + +This function grants the clone schema privileges to a non-superuser. Syntax: @@ -17,21 +18,19 @@ Syntax: GRANT_CLONE_SCHEMA_PRIVILEGES( TEXT, [ BOOLEAN], [ BOOLEAN]) ``` -Where, - `user_name` -Name of the user to whom privileges are to be granted to do local cloning. +Name of the user to grant local cloning privileges to. `allow_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value grants user the privileges to do remote cloning. +Optionally, provide a Boolean value to this parameter to control remote cloning by the user. By default, the value is `false`. The `true` value grants the user the privileges to do remote cloning. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default, the value is `false`. The `true` value prints the executed commands on the terminal. -This example shows how to grant a non-super user ec2-user the privileges for local and remote cloning: +This example shows how to grant a non-superuser ec2-user the privileges for local and remote cloning: ```sql SELECT edb_util.grant_clone_schema(user_name => 'ec2-user', @@ -59,7 +58,7 @@ INFO: Executed command: GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO "ec ## REVOKE_CLONE_SCHEMA_PRIVILEGES -You can revoke the clone schema privileges from a non-super user using this function. +This function revokes the clone schema privileges from a non-superuser. Syntax: @@ -67,19 +66,17 @@ Syntax: revoke_clone_schema_privileges( TEXT[, BOOLEAN][, BOOLEAN]) ``` -Where, - `user_name` -Name of the user from whom we want to revoke the cloning privileges. +Name of the user to revoke the cloning privileges from. `revoke_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value revokes the remote cloning privileges from the user. +Optionally, provide a Boolean value to this parameter to control the remote cloning by the user. By default, the value is `false`. The `true` value revokes the remote cloning privileges from the user. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default the value is `false`. The `true` value prints the executed commands on the terminal. This example shows how to revoke cloning privileges from the ec2-user user. @@ -107,11 +104,9 @@ INFO: Revoked USAGE on foreign data wrapper postgres_fdw from ec2-user. (1 row) ``` -## Example - clone a schema locally as a non-super user +## Example: Clone a schema locally as a non-superuser -This example shows how to clone a local schema as a non-super user: - -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs PASSWORD `abc123`; @@ -119,7 +114,7 @@ __OUTPUT__ CREATE ROLE ``` -Give CREATE privileges to `forcs` user on `edb` database: +Give CREATE privileges on the `edb` database to `forcs`: ```sql GRANT CREATE on DATABASE edb to forcs; @@ -156,7 +151,7 @@ __OUTPUT__ (1 row) ``` -Give clone schema privilege to `forcs` user: +Give the clone schema privilege to `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -179,7 +174,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to `edb` datbase as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 6543 -U forcs edb @@ -228,11 +223,9 @@ __OUTPUT__ (1 row) ``` -## Example - clone a schema remotely as a non-super user - -This example shows how to clone a schema remotely as a non-super user. +## Example: Clone a schema remotely as a non-superuser -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs password `abc123`; @@ -269,7 +262,7 @@ __OUTPUT__ (1 row) ``` -Give the clone schema privileges to the non-super user `forcs`: +Give the clone schema privileges to the non-superuser `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -292,7 +285,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to the `edb` database as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 4422 -U forcs edb @@ -312,7 +305,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Create a foregin server and user mapping in the source database: +Create a foreign server and user mapping in the source database: ```sql CREATE SERVER src_postgres_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host '127.0.0.1', port '6543', dbname 'edb'); @@ -322,7 +315,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Clone the schema from source to target database using `remotecopyschema` function: +Clone the schema from source to target database using the `remotecopyschema` function: ```sql select edb_util.remotecopyschema('src_postgres_server','local_postgres_server','src','src','src_log',true,true,true,4); @@ -331,4 +324,4 @@ __OUTPUT__ ------------------ t (1 row) -``` \ No newline at end of file +``` diff --git a/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx b/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx index b4d1a42fe95..12b9b1d9860 100644 --- a/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx +++ b/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx @@ -32,8 +32,8 @@ Use the following functions with EDB Clone Schema: - `process_status_from_log`. This function displays the status of the cloning functions. The information is obtained from a log file you specify when invoking a cloning function. See [process_status_from_log](checking_the_status) for more information. - `remove_log_file_and_job`. This function deletes the log file created by a cloning function. You can also use this function to delete a job created by the non-blocking form of the function. See [remove_log_file_and_job](performing_cleanup_tasks) for more information. - `create_clone_log_dir`. This function creates a directory to store all the log files created by a cloning function. -- `grant_clone_schema_privileges`. This function grants the privileges to a non-super user to clone the schema. -- `revoke_clone_schema_privileges`. This function revokes the privileges from a non-super user for cloning the schema. +- `grant_clone_schema_privileges`. This function grants the privileges to clone the schema to a non-superuser. +- `revoke_clone_schema_privileges`. This function revokes the privileges to clone the schema from a non-superuser. ## List of supported database objects diff --git a/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx b/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx index b2127d77d11..31a97e0e104 100644 --- a/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx +++ b/product_docs/docs/epas/15/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx @@ -33,7 +33,7 @@ Modify the `postgresql.conf` file by adding `$libdir/parallel_clone` to the `sha shared_preload_libraries = '$libdir/dbms_pipe,$libdir/dbms_aq,$libdir/parallel_clone' ``` -Restart the database server to load the libraries with clone schema support. +To load the libraries with clone schema support, restart the database server. ## Installing PL/Perl @@ -108,17 +108,17 @@ Install the EDB Clone Schema on any database to be used as the source or target CREATE EXTENSION edb_cloneschema; ``` -## Creating Log directory +## Creating log directory The log directory is required to store all the log files. -After creating the extensions the following statement must be executed, as a superuser, to create the log directory: +After creating the extensions, to create the log directory, execute the following statement as a superuser: ```sql SELECT edb_util.create_clone_log_dir(); ``` -It returns the value true on successful execution. +When successful, the command returns `true`. ## Creating the foreign servers and user mappings @@ -136,7 +136,7 @@ For the `localcopyschema` and `localcopyschema_nb` functions, the source and tar The user mapping defines the connection and authentication information for the foreign server. You must create this foreign server and user mapping in the database of the local server in which the cloning occurs. -The database user for whom the user mapping is defined must be a superuser and connected to the local server when invoking an EDB Clone Schema function. +When invoking an EDB Clone Schema function, the database user for whom the user mapping is defined must be a superuser and be connected to the local server. This example creates the foreign server for the database containing the schema to clone and to receive the cloned schema: @@ -203,9 +203,9 @@ The foreign server defining the originating database server and its database con The foreign server defining the database server and its database to receive the schema to clone is referred to as the *target server* or the *local server*. The target server is also referred to as the local server because this server is the one to which you must be connected when invoking the `remotecopyschema` or `remotecopyschema_nb` function. -The user mappings define the connection and authentication information for the foreign servers. You must create all of these foreign servers and user mappings in the target database of the target/local server. The database user for whom the user mappings are defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function. +The user mappings define the connection and authentication information for the foreign servers. You must create all of these foreign servers and user mappings in the target database of the target/local server. When invoking an EDB Clone Schema function, the database user for whom the user mappings are defined must have the required privileges and be connected to the local server. -This example creates the foreign server for the local, target database that receives the cloned schema: +This example creates the foreign server for the local target database that receives the cloned schema: ```sql CREATE SERVER tgt_server FOREIGN DATA WRAPPER postgres_fdw diff --git a/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx b/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx index f559c2230da..d1437080d26 100644 --- a/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx +++ b/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/cloning_with_a_non_super_user.mdx @@ -1,15 +1,16 @@ --- -title: Cloning schema as a non-super user +title: Cloning schema as a non-superuser --- -You can now clone the schema as a non-super user. These two functions are created while creating the extension: -- GRANT_CLONE_SCHEMA_PRIVILEGES - Grants the privileges to a non-super user to clone the schema. -- REVOKE_CLONE_SCHEMA_PRIVILEGES - Revokes the privileges from a non-super user for cloning the schema. +You can clone the schema as a non-superuser. These two functions are created while creating the extension: + +- `GRANT_CLONE_SCHEMA_PRIVILEGES` — Grants the privileges to clone the schema to a non-superuser. +- `REVOKE_CLONE_SCHEMA_PRIVILEGES` — Revokes the privileges to clone the schema from a non-superuser. ## GRANT_CLONE_SCHEMA_PRIVILEGES -You can grant the clone schema privileges to a non-super user using this function. +This function grants the clone schema privileges to a non-superuser. Syntax: @@ -17,21 +18,19 @@ Syntax: GRANT_CLONE_SCHEMA_PRIVILEGES( TEXT, [ BOOLEAN], [ BOOLEAN]) ``` -Where, - `user_name` -Name of the user to whom privileges are to be granted to do local cloning. +Name of the user to grant local cloning privileges to. `allow_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value grants user the privileges to do remote cloning. +Optionally, provide a Boolean value to this parameter to control remote cloning by the user. By default, the value is `false`. The `true` value grants the user the privileges to do remote cloning. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default, the value is `false`. The `true` value prints the executed commands on the terminal. -This example shows how to grant a non-super user ec2-user the privileges for local and remote cloning: +This example shows how to grant a non-superuser ec2-user the privileges for local and remote cloning: ```sql SELECT edb_util.grant_clone_schema(user_name => 'ec2-user', @@ -59,7 +58,7 @@ INFO: Executed command: GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO "ec ## REVOKE_CLONE_SCHEMA_PRIVILEGES -You can revoke the clone schema privileges from a non-super user using this function. +This function revokes the clone schema privileges from a non-superuser. Syntax: @@ -67,19 +66,17 @@ Syntax: revoke_clone_schema_privileges( TEXT[, BOOLEAN][, BOOLEAN]) ``` -Where, - `user_name` -Name of the user from whom we want to revoke the cloning privileges. +Name of the user to revoke the cloning privileges from. `revoke_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value revokes the remote cloning privileges from the user. +Optionally, provide a Boolean value to this parameter to control the remote cloning by the user. By default, the value is `false`. The `true` value revokes the remote cloning privileges from the user. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default the value is `false`. The `true` value prints the executed commands on the terminal. This example shows how to revoke cloning privileges from the ec2-user user. @@ -107,11 +104,9 @@ INFO: Revoked USAGE on foreign data wrapper postgres_fdw from ec2-user. (1 row) ``` -## Example - clone a schema locally as a non-super user +## Example: Clone a schema locally as a non-superuser -This example shows how to clone a local schema as a non-super user: - -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs PASSWORD `abc123`; @@ -119,7 +114,7 @@ __OUTPUT__ CREATE ROLE ``` -Give CREATE privileges to `forcs` user on `edb` database: +Give CREATE privileges on the `edb` database to `forcs`: ```sql GRANT CREATE on DATABASE edb to forcs; @@ -156,7 +151,7 @@ __OUTPUT__ (1 row) ``` -Give clone schema privilege to `forcs` user: +Give the clone schema privilege to `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -179,7 +174,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to `edb` datbase as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 6543 -U forcs edb @@ -228,11 +223,9 @@ __OUTPUT__ (1 row) ``` -## Example - clone a schema remotely as a non-super user - -This example shows how to clone a schema remotely as a non-super user. +## Example: Clone a schema remotely as a non-superuser -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql CREATE USER forcs password `abc123`; @@ -269,7 +262,7 @@ __OUTPUT__ (1 row) ``` -Give the clone schema privileges to the non-super user `forcs`: +Give the clone schema privileges to the non-superuser `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -292,7 +285,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to the `edb` database as `forcs` user: +Connect to the `edb` database as `forcs`: ``` edb-psql -h 127.0.0.1 -p 4422 -U forcs edb @@ -322,7 +315,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Clone the schema from source to target database using `remotecopyschema` function: +Clone the schema from source to target database using the `remotecopyschema` function: ```sql select edb_util.remotecopyschema('src_postgres_server','local_postgres_server','src','src','src_log',true,true,true,4); @@ -331,4 +324,4 @@ __OUTPUT__ ------------------ t (1 row) -``` \ No newline at end of file +``` diff --git a/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx b/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx index b4d1a42fe95..12b9b1d9860 100644 --- a/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx +++ b/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/edb_clone_schema_overview.mdx @@ -32,8 +32,8 @@ Use the following functions with EDB Clone Schema: - `process_status_from_log`. This function displays the status of the cloning functions. The information is obtained from a log file you specify when invoking a cloning function. See [process_status_from_log](checking_the_status) for more information. - `remove_log_file_and_job`. This function deletes the log file created by a cloning function. You can also use this function to delete a job created by the non-blocking form of the function. See [remove_log_file_and_job](performing_cleanup_tasks) for more information. - `create_clone_log_dir`. This function creates a directory to store all the log files created by a cloning function. -- `grant_clone_schema_privileges`. This function grants the privileges to a non-super user to clone the schema. -- `revoke_clone_schema_privileges`. This function revokes the privileges from a non-super user for cloning the schema. +- `grant_clone_schema_privileges`. This function grants the privileges to clone the schema to a non-superuser. +- `revoke_clone_schema_privileges`. This function revokes the privileges to clone the schema from a non-superuser. ## List of supported database objects diff --git a/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx b/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx index 7196c2914b7..36e08a4f068 100644 --- a/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx +++ b/product_docs/docs/epas/16/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx @@ -32,7 +32,7 @@ Modify the `postgresql.conf` file by adding `$libdir/parallel_clone` to the `sha ```ini shared_preload_libraries = '$libdir/dbms_pipe,$libdir/dbms_aq,$libdir/parallel_clone' ``` -Restart the database server to load the libraries with clone schema support. +To load the libraries with clone schema support, restart the database server. ## Installing PL/Perl @@ -108,17 +108,17 @@ Install the EDB Clone Schema on any database to be used as the source or target CREATE EXTENSION edb_cloneschema; ``` -## Creating Log directory +## Creating log directory The log directory is required to store all the log files. -After creating the extensions the following statement must be executed, as a superuser, to create the log directory: +After creating the extensions, to create the log directory, execute the following statement as a superuser: ```sql SELECT edb_util.create_clone_log_dir(); ``` -It returns the value true on successful execution. +When successful, the command returns `true`. ## Creating the foreign servers and user mappings @@ -136,7 +136,7 @@ For the `localcopyschema` and `localcopyschema_nb` functions, the source and tar The user mapping defines the connection and authentication information for the foreign server. You must create this foreign server and user mapping in the database of the local server in which the cloning occurs. -The database user for whom the user mapping is defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function. +When invoking an EDB Clone Schema function, the database user for whom the user mapping is defined must have the required privileges and be connected to the local server. This example creates the foreign server for the database containing the schema to clone and to receive the cloned schema: @@ -203,9 +203,9 @@ The foreign server defining the originating database server and its database con The foreign server defining the database server and its database to receive the schema to clone is referred to as the *target server* or the *local server*. The target server is also referred to as the local server because this server is the one to which you must be connected when invoking the `remotecopyschema` or `remotecopyschema_nb` function. -The user mappings define the connection and authentication information for the foreign servers. You must create all of these foreign servers and user mappings in the target database of the target/local server. The database user for whom the user mappings are defined must have required privileges and the user must be connected to the local server when invoking an EDB Clone Schema function. +The user mappings define the connection and authentication information for the foreign servers. You must create all of these foreign servers and user mappings in the target database of the target/local server. When invoking an EDB Clone Schema function, the database user for whom the user mappings are defined must have the required privileges and be connected to the local server. -This example creates the foreign server for the local, target database that receives the cloned schema: +This example creates the foreign server for the local target database that receives the cloned schema: ```sql CREATE SERVER tgt_server FOREIGN DATA WRAPPER postgres_fdw diff --git a/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/cloning_with_non_super_user.mdx b/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/cloning_with_non_super_user.mdx index 6104dd6f6cb..abf375e8efa 100644 --- a/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/cloning_with_non_super_user.mdx +++ b/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/cloning_with_non_super_user.mdx @@ -1,15 +1,15 @@ --- -title: "Cloning schema as a non-super user" +title: "Cloning schema as a non-superuser" --- -You can now clone the schema as a non-super user. This two functions are created while creating the extension: +You can clone the schema as a non-superuser. These two functions are created while creating the extension: -- GRANT_CLONE_SCHEMA_PRIVILEGES - Grants the privileges to a non-super user to clone the schema. -- REVOKE_CLONE_SCHEMA_PRIVILEGES - Revokes the privileges from a non-super user for cloning the schema. +- `GRANT_CLONE_SCHEMA_PRIVILEGES` — Grants the privileges to clone the schema to a non-superuser. +- `REVOKE_CLONE_SCHEMA_PRIVILEGES` — Revokes the privileges to clone the schema from a non-superuser. ## GRANT_CLONE_SCHEMA_PRIVILEGES -You can grant the clone schema privileges to a non-super user using this function. +This function grants the clone schema privileges to a non-superuser. Syntax: @@ -17,21 +17,19 @@ Syntax: GRANT_CLONE_SCHEMA_PRIVILEGES( TEXT, [ BOOLEAN], [ BOOLEAN]) ``` -Where, - `user_name` -Name of the user to whom privileges are to be granted to do local cloning. +Name of the user to grant local cloning privileges to. `allow_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value grants user the privileges to do remote cloning. +Optionally, provide a Boolean value to this parameter to control remote cloning by the user. By default, the value is `false`. The `true` value grants the user the privileges to do remote cloning. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default, the value is `false`. The `true` value prints the executed commands on the terminal. -This example shows how to grant a non-super user ec2-user the privileges for local and remote cloning: +This example shows how to grant a non-superuser ec2-user the privileges for local and remote cloning: ```sql SELECT edb_util.grant_clone_schema(user_name => 'ec2-user', @@ -59,7 +57,7 @@ INFO: Executed command: GRANT USAGE ON FOREIGN DATA WRAPPER postgres_fdw TO "ec ## REVOKE_CLONE_SCHEMA_PRIVILEGES -You can revoke the clone schema privileges from a non-super user using this function. +This function revokes the clone schema privileges from a non-superuser. Syntax: @@ -67,19 +65,17 @@ Syntax: revoke_clone_schema_privileges( TEXT[, BOOLEAN][, BOOLEAN]) ``` -Where, - `user_name` -Name of the user from whom we want to revoke the cloning privileges. +Name of the user to revoke the cloning privileges from. `revoke_remote_schema_clone` -Optionally provide a boolean value to this parameter to control the remote cloning by the user. By default the value is set to False. The true value revokes the remote cloning privileges from the user. +Optionally, provide a Boolean value to this parameter to control the remote cloning by the user. By default, the value is `false`. The `true` value revokes the remote cloning privileges from the user. `print_commands` -Optionally provide a boolean value to this parameter to control printing of the executed commands. By default the value is set to false. The true value prints the executed commands on the terminal. +Optionally, provide a Boolean value to this parameter to control whether executed commands print on the terminal. By default the value is `false`. The `true` value prints the executed commands on the terminal. This example shows how to revoke cloning privileges from the ec2-user user. @@ -109,9 +105,9 @@ INFO: Revoked USAGE on foreign data wrapper postgres_fdw from ec2-user. ## Examples -This example shows how to clone a schema locally as a non-super user: +This example shows how to clone a schema locally as a non-superuser: -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql edb-psql -p 6543 -U enterprisedb edb @@ -120,7 +116,7 @@ __OUTPUT__ CREATE ROLE ``` -Give CREATE privileges to `forcs` user on `edb` database: +Give CREATE privileges on the `edb` database to `forcs`: ```sql GRANT CREATE on DATABASE edb to forcs; @@ -157,7 +153,7 @@ __OUTPUT__ (1 row) ``` -Give clone schema privilege to `forcs` user: +Give the clone schema privilege to `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -180,7 +176,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to `edb` database as `forcs` user: +Connect to the `edb` database as `forcs`: ```sql edb-psql -h 127.0.0.1 -p 6543 -U forcs edb @@ -229,9 +225,9 @@ __OUTPUT__ (1 row) ``` -This example shows how to clone a schema remotely as a non-super user: +This example shows how to clone a schema remotely as a non-superuser. -Create a non-super user named `forcs` for this example: +Create a non-superuser named `forcs`: ```sql edb-psql -p 4422 -U enterprisedb edb @@ -240,7 +236,7 @@ __OUTPUT__ CREATE ROLE ``` -Give CREATE privileges on `edb` database to `forcs` user: +Give CREATE privileges on the `edb` database to `forcs`: ```sql GRANT CREATE on DATABASE edb to forcs; @@ -277,7 +273,7 @@ __OUTPUT__ (1 row) ``` -Give the clone schema privileges to the non-super user `forcs`: +Give clone schema privileges to the non-superuser `forcs`: ```sql SELECT edb_util.grant_clone_schema_privileges('forcs', true, true); @@ -300,7 +296,7 @@ INFO: Granted USAGE on foreign data wrapper postgres_fdw to forcs. (1 row) ``` -Connect to the `edb` database as `forcs` user: +Connect to the `edb` database as `forcs`: ```sql @@ -326,7 +322,7 @@ CREATE SERVER CREATE USER MAPPING ``` -Clone the schema from source to target database using `remotecopyschema` function: +Clone the schema from source to target database using the `remotecopyschema` function: ```sql diff --git a/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx b/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx index d0571fb3769..fcbfcee9364 100644 --- a/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx +++ b/product_docs/docs/epas/17/database_administration/14_edb_clone_schema/setting_up_edb_clone_schema.mdx @@ -32,7 +32,7 @@ Modify the `postgresql.conf` file by adding `$libdir/parallel_clone` and `$libdi shared_preload_libraries = '$libdir/dbms_pipe,$libdir/dbms_aq,$libdir/parallel_clone,$libdir/edb_job_scheduler' ``` -Restart the database server to reflect the changes. +For the changes to take effect, you must restart the database server. ## Installing PL/Perl @@ -135,7 +135,7 @@ For the `localcopyschema` and `localcopyschema_nb` functions, the source and tar The user mapping defines the connection and authentication information for the foreign server. You must create this foreign server and user mapping in the database of the local server in which the cloning occurs. -The database user for whom the user mapping is defined must be a superuser and connected to the local server when invoking an EDB Clone Schema function. +When invoking an EDB Clone Schema function, the database user for whom the user mapping is defined must be a superuser and be connected to the local server. This example creates the foreign server for the database containing the schema to clone and to receive the cloned schema: @@ -202,9 +202,9 @@ The foreign server defining the originating database server and its database con The foreign server defining the database server and its database to receive the schema to clone is referred to as the *target server* or the *local server*. The target server is also referred to as the local server because this server is the one to which you must be connected when invoking the `remotecopyschema` or `remotecopyschema_nb` function. -The user mappings define the connection and authentication information for the foreign servers. You must create all of these foreign servers and user mappings in the target database of the target/local server. The database user for whom the user mappings are defined must be a superuser and the user connected to the local server when invoking an EDB Clone Schema function. +The user mappings define the connection and authentication information for the foreign servers. You must create all of these foreign servers and user mappings in the target database of the target/local server. When invoking an EDB Clone Schema function, the database user for whom the user mappings are defined must be a superuser and the user connected to the local server. -This example creates the foreign server for the local, target database that receives the cloned schema: +This example creates the foreign server for the local target database that receives the cloned schema: ```sql CREATE SERVER tgt_server FOREIGN DATA WRAPPER postgres_fdw diff --git a/product_docs/docs/epas/17/database_administration/roles.mdx b/product_docs/docs/epas/17/database_administration/roles.mdx index d073af7fd4b..8444adafa9c 100644 --- a/product_docs/docs/epas/17/database_administration/roles.mdx +++ b/product_docs/docs/epas/17/database_administration/roles.mdx @@ -2,15 +2,15 @@ title: Predefined roles --- -A set of predefined roles provides access to certain, commonly needed, privileged capabilities and information. Administrators including roles that have the CREATE ROLE privilege can GRANT these roles to users and/or other roles in their environment. The users/roles with these roles will have access to the specified capabilities and information. +A set of predefined roles provides access to certain commonly needed privileged capabilities and information. Administrators, including roles that have the CREATE ROLE privilege, can GRANT these roles to users and other roles in their environment. The users or roles with these roles will have access to the specified capabilities and information. -For the complete list of the PostgreSQL's predefined roles, see [Predefined roles](https://www.postgresql.org/docs/17/predefined-roles.html) in the PostgreSQL documentation. +For the complete list of the PostgreSQL predefined roles, see [Predefined roles](https://www.postgresql.org/docs/17/predefined-roles.html) in the PostgreSQL documentation. -The following table provides the predefined roles specific to EDB Postgres Advanced Server: +The table provides the predefined roles specific to EDB Postgres Advanced Server. -| Role | Allowed access | -|---------------------------|----------------------------------------------------------------------| -| aq_administrator_role | Allows creation and administration of queuing infrastructure. | -| capture_admin | Allows the execute permission on the DBMS_PRIVILEGE_CAPTURE package. | -| edb_createdirectory_admin | Allows the user to create a directory. | -| edb_dropdirectory_admin | Allows the user to drop any directory. | +| Role | Allowed access | +|---------------------------|----------------------------------------------------------| +| aq_administrator_role | Creating and administering queuing infrastructure | +| capture_admin | Execute permission on the DBMS_PRIVILEGE_CAPTURE package | +| edb_createdirectory_admin | Ability to create a directory | +| edb_dropdirectory_admin | Ability to drop any directory | diff --git a/product_docs/docs/epas/17/installing/linux_install_details/rpm_packages.mdx b/product_docs/docs/epas/17/installing/linux_install_details/rpm_packages.mdx index 0eec46712f5..b99d42474a8 100644 --- a/product_docs/docs/epas/17/installing/linux_install_details/rpm_packages.mdx +++ b/product_docs/docs/epas/17/installing/linux_install_details/rpm_packages.mdx @@ -27,75 +27,63 @@ Where `package` is the search term that specifies the name or partial name of a !!! Note The available package list is subject to change. -| Package name | Installed by default | Package installs | -| -------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| edb-as17-server | Yes | Installs core components of the EDB Postgres Advanced Server database server. | -| edb-as17-server-client | Yes | Client programs and utilities that you can use to access and manage EDB Postgres Advanced Server. | -| edb-as17-server-contrib | Yes | Installs contributed tools and utilities that are distributed with EDB Postgres Advanced Server. Files for these modules are installed in:

Documentation: `/usr/edb/as17/share/doc`

Loadable modules: `/usr/edb/as17/lib`

Binaries: `/usr/edb/as17/bin` | -| edb-as17-server-core | Yes | Includes the programs needed to create the core functionality behind the EDB Postgres Advanced Server database. | -| edb-as17-server-devel | No | Installs the header files and libraries needed to compile C or C++ applications that directly interact with an EDB Postgres Advanced Server server and the ecpg or ecpgPlus C preprocessor. | -| edb-as17-server-docs | Yes | Installs the readme file. | -| edb-as17-server-edb-modules | No | Installs supporting modules for EDB Postgres Advanced Server. | -| edb-as17-server-libs | Yes | Provides the essential shared libraries for any EDB Postgres Advanced Server client program or interface. | -| edb-as17-server-llvmjit | No | Contains support for just-in-time (JIT) compiling parts of EDB Postgres Advanced Server's queries. You need to install this package separately. | -| edb-as17-server-pldebugger | No | Implements an API for debugging PL/pgSQL functions on EDB Postgres Advanced Server. | -| edb-as17-server-plperl | Yes | Installs the PL/Perl procedural language for EDB Postgres Advanced Server. The `edb-as17-server-plperl` package depends on the platform-supplied version of Perl. | -| edb-as17-server-plpython3 | Yes | Installs the PL/Python procedural language for EDB Postgres Advanced Server. The PL/Python2 support is no longer available in EDB Postgres Advanced Server version 15 and later. | -| edb-as17-server-pltcl | Yes | Installs the PL/Tcl procedural language for EDB Postgres Advanced Server. The `edb-as17-server-pltcl` package depends on the platform-supplied version of TCL. | -| edb-as17-server-sqlprofiler | No | Installs EDB Postgres Advanced Server's SQL Profiler feature. SQL Profiler helps identify and optimize SQL code. | -| edb-as17-server-sqlprotect | Yes | Installs EDB Postgres Advanced Server's SQL Protect feature. SQL Protect provides protection against SQL injection attacks. | -| edb-as17-server-sslutils | No | Installs functionality that provides SSL support. | -| edb-as17-server-cloneschema | No | Installs the EDB Clone Schema extension. For more information about EDB Clone Schema, see [EDB clone schema](../../database_administration/14_edb_clone_schema/). | -| edb-as17-server-parallel-clone | No | Installs functionality that supports the EDB Clone Schema extension. | -| edb-as17-edbplus | No | The `edb-edbplus` package contains the files required to install the EDB\*Plus command line client. EDB\*Plus commands are compatible with Oracle's SQL\*Plus. | -| edb-as17-pgpool44-extensions | No | Creates pgPool extensions required by the server for use with pgpool. | -| edb-as17-postgis34 | No | Installs POSTGIS meta RPMs. | -| edb-as17-postgis34-core | No | Provides support for geographic objects to the PostgreSQL object-relational database. In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. | -| edb-as17-postgis34-docs | No | Installs PDF documentation of PostGIS. | -| edb-as17-postgis34-utils | No | Installs the utilities for PostGIS. | -| edb-as17-postgis34-gui | No | Provides a GUI for PostGIS. | -| edb-as17-libicu | No | Contains the supporting library files. -| edb-as17-hdfs-fdw | No | The Hadoop Data Adapter allows you to query and join data from Hadoop environments with your Postgres or EDB Postgres Advanced Server instances. It's YARN Ready certified with HortonWorks and provides optimizations for performance with predicate pushdown support. | -| edb-as17-hdfs-fdw-doc | No | Documentation for the Hadoop Data Adapter. | -| edb-as17-mongo-fdw | No | EDB Postgres Advanced Server extension that implements a foreign data wrapper for MongoDB. | -| edb-as17-mongo-fdw-doc | No | Documentation for the foreign data wrapper for MongoDB. | -| edb-as17-mysql-fdw | No | EDB Postgres Advanced Server extension that implements a foreign data wrapper for MySQL. |7 +| Package name | Installed by default | Package installs | +|--------------------------------|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| edb-as17-server | Yes | Installs core components of the EDB Postgres Advanced Server database server. | +| edb-as17-server-client | Yes | Client programs and utilities that you can use to access and manage EDB Postgres Advanced Server. | +| edb-as17-server-contrib | Yes | Installs contributed tools and utilities that are distributed with EDB Postgres Advanced Server. Files for these modules are installed in:

Documentation: `/usr/edb/as17/share/doc`

Loadable modules: `/usr/edb/as17/lib`

Binaries: `/usr/edb/as17/bin` | +| edb-as17-server-core | Yes | Includes the programs needed to create the core functionality behind the EDB Postgres Advanced Server database. | +| edb-as17-server-devel | No | Installs the header files and libraries needed to compile C or C++ applications that directly interact with an EDB Postgres Advanced Server server and the ecpg or ecpgPlus C preprocessor. | +| edb-as17-server-docs | Yes | Installs the readme file. | +| edb-as17-server-edb-modules | No | Installs supporting modules for EDB Postgres Advanced Server. | +| edb-as17-server-libs | Yes | Provides the essential shared libraries for any EDB Postgres Advanced Server client program or interface. | +| edb-as17-server-llvmjit | No | Contains support for just-in-time (JIT) compiling parts of EDB Postgres Advanced Server's queries. You need to install this package separately. | +| edb-as17-server-pldebugger | No | Implements an API for debugging PL/pgSQL functions on EDB Postgres Advanced Server. | +| edb-as17-server-plperl | Yes | Installs the PL/Perl procedural language for EDB Postgres Advanced Server. The `edb-as17-server-plperl` package depends on the platform-supplied version of Perl. | +| edb-as17-server-plpython3 | Yes | Installs the PL/Python procedural language for EDB Postgres Advanced Server. The PL/Python2 support is no longer available in EDB Postgres Advanced Server version 15 and later. | +| edb-as17-server-pltcl | Yes | Installs the PL/Tcl procedural language for EDB Postgres Advanced Server. The `edb-as17-server-pltcl` package depends on the platform-supplied version of TCL. | +| edb-as17-server-sqlprofiler | No | Installs EDB Postgres Advanced Server's SQL Profiler feature. SQL Profiler helps identify and optimize SQL code. | +| edb-as17-server-sqlprotect | Yes | Installs EDB Postgres Advanced Server's SQL Protect feature. SQL Protect provides protection against SQL injection attacks. | +| edb-as17-server-sslutils | No | Installs functionality that provides SSL support. | +| edb-as17-server-cloneschema | No | Installs the EDB Clone Schema extension. For more information about EDB Clone Schema, see [EDB clone schema](../../database_administration/14_edb_clone_schema/). | +| edb-as17-server-parallel-clone | No | Installs functionality that supports the EDB Clone Schema extension. | +| edb-as17-edbplus | No | The `edb-edbplus` package contains the files required to install the EDB\*Plus command line client. EDB\*Plus commands are compatible with Oracle's SQL\*Plus. | +| edb-as17-pgpool44-extensions | No | Creates pgPool extensions required by the server for use with pgpool. | +| edb-as17-postgis34 | No | Installs POSTGIS meta RPMs. | +| edb-as17-postgis34-core | No | Provides support for geographic objects to the PostgreSQL object-relational database. In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. | +| edb-as17-postgis34-docs | No | Installs PDF documentation of PostGIS. | +| edb-as17-postgis34-utils | No | Installs the utilities for PostGIS. | +| edb-as17-postgis34-gui | No | Provides a GUI for PostGIS. | +| edb-as17-libicu | No | Contains the supporting library files. | +| edb-as17-hdfs-fdw | No | The Hadoop Data Adapter allows you to query and join data from Hadoop environments with your Postgres or EDB Postgres Advanced Server instances. It's YARN Ready certified with HortonWorks and provides optimizations for performance with predicate pushdown support. | +| edb-as17-hdfs-fdw-doc | No | Documentation for the Hadoop Data Adapter. | +| edb-as17-mongo-fdw | No | EDB Postgres Advanced Server extension that implements a foreign data wrapper for MongoDB. | +| edb-as17-mongo-fdw-doc | No | Documentation for the foreign data wrapper for MongoDB. | +| edb-as17-mysql-fdw | No | EDB Postgres Advanced Server extension that implements a foreign data wrapper for MySQL. | + The following table lists the packages for EDB Postgres Advanced Server supporting components. -| Package name | Package installs | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| edb-pgpool44 | Contains the pgPool-II installer. The pgpool-II utility package acts as a middleman between client applications and server database servers. pgpool-II functionality is transparent to client applications. Client applications connect to pgpool-II instead of directly to EDB Postgres Advanced Server, and pgpool-II manages the connection. EDB supports the following pgpool-II features:
- Load balancing
- Connection pooling
- High availability
- Connection limits


pgpool-II runs as a service on Linux systems, and isn't supported on Windows systems.
| -| edb-jdbc | The `edb-jdbc` package includes the `.jar` files needed for Java programs to access an EDB Postgres Advanced Server database. | -| edb-migrationtoolkit | The `edb-migrationtoolkit` package installs Migration Toolkit, facilitating migration to an EDB Postgres Advanced Server database from Oracle, PostgreSQL, MySQL, Sybase, and SQL Server. | -| edb-oci | The `edb-oci` package installs the EDB Open Client library, allowing applications that use the Oracle Call Interface API to connect to an EDB Postgres Advanced Server database. | -| edb-oci-devel | Installs the OCI include files. Install this package if you're developing C/C++ applications that require these files. | -| edb-odbc | Installs the driver needed for applications to access an EDB Postgres Advanced Server system by way of ODBC. | -| edb-odbc-devel | Installs the ODBC include files. Install this package if you're developing C/C++ applications that require these files. | -| edb-pgbouncer121 | Contains PgBouncer (a lightweight connection pooler). This package requires the `libevent` package. | -| ppas-xdb | Contains the xDB installer. xDB provides asynchronous cross-database replication. | -| ppas-xdb-console | Provides support for xDB. | -| ppas-xdb-libs | Provides support for xDB. | -| ppas-xdb-publisher | Provides support for xDB. | -| ppas-xdb-subscriber | Provides support for xDB. | -| edb-pem | The `edb-pem` package installs the management tool that efficiently manages, monitors, and tunes large Postgres deployments from a single remote GUI console. | -| edb-pem-agent | The `edb-pem-agent` is an agent component of Postgres Enterprise Manager. | -| edb-pem-docs | Contains documentation for various languages, which are in HTML format. | -| edb-pem-server | Contains server components of Postgres Enterprise Manager. | -| pgadmin4 | Installs all required components to run pgadmin4 in desktop and web modes. Pgadmin4 is a management tool for Postgres capable of hosting the Python application and presenting it to the user as a desktop application. | -| pgadmin4-desktop | Installs pgadmin4 for desktop mode only. | -| pgadmin4-web | Installs pgadmin4 for web mode only. | -| pgadmin4-server | Installs pgadmin4's core server package. | -| edb-efm40 | Installs EDB Failover Manager that adds fault tolerance to database clusters to minimize downtime when a primary database fails by keeping data online in high availability configurations. | -| edb-rs | A Java-based replication framework that provides asynchronous replication across Postgres and EDB Postgres Advanced Server database servers. It supports primary-standby, primary-primary, and hybrid configurations. | -| edb-rs-client | A Java-based command-line tool that's used to configure and operate a replication network by way of different commands by interacting with the EPRS server. | -| edb-rs-datavalidator | A Java-based command-line tool that provides row- and-column level data comparison of a source and target database table. The supported RDBMS servers include PostgreSQL, EDB Postgres Advanced Server, Oracle, and MS SQL Server. | -| edb-rs-libs | Contains certain libraries that are commonly used by ERPS server, EPRS client, and monitoring modules. | -| edb-rs-monitor | A Java-based application that provides monitoring capabilities to ensure a smooth functioning of the EPRS replication cluster. | -| edb-rs-server | A Java-based replication framework that provides asynchronous replication across Postgres and EDB Postgres Advanced Server database servers. It supports primary-standby, primary-primary, and hybrid configurations. | -| edb-bart | Installs the Backup and Recovery Tool (BART) to support online backup and recovery across local and remote PostgreSQL and EDB Postgres Advanced Server servers. | -| libevent-edb | Contains supporting library files. | -| libiconv-edb | Contains supporting library files. | -| libevent-edb-devel | Contains supporting library files. | +| Package name | Package installs | +|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| edb-pgpool44 | Contains the pgPool-II installer. The pgpool-II utility package acts as a middleman between client applications and server database servers. pgpool-II functionality is transparent to client applications. Client applications connect to pgpool-II instead of directly to EDB Postgres Advanced Server, and pgpool-II manages the connection. EDB supports the following pgpool-II features:
- Load balancing
- Connection pooling
- High availability
- Connection limits


pgpool-II runs as a service on Linux systems, and isn't supported on Windows systems.
| +| edb-jdbc | The `edb-jdbc` package includes the `.jar` files needed for Java programs to access an EDB Postgres Advanced Server database. | +| edb-migrationtoolkit | The `edb-migrationtoolkit` package installs Migration Toolkit, facilitating migration to an EDB Postgres Advanced Server database from Oracle, PostgreSQL, MySQL, Sybase, and SQL Server. | +| edb-oci | The `edb-oci` package installs the EDB Open Client library, allowing applications that use the Oracle Call Interface API to connect to an EDB Postgres Advanced Server database. | +| edb-oci-devel | Installs the OCI include files. Install this package if you're developing C/C++ applications that require these files. | +| edb-odbc | Installs the driver needed for applications to access an EDB Postgres Advanced Server system by way of ODBC. | +| edb-odbc-devel | Installs the ODBC include files. Install this package if you're developing C/C++ applications that require these files. | +| edb-pgbouncer121 | Contains PgBouncer (a lightweight connection pooler). This package requires the `libevent` package. | +| edb-pem | The `edb-pem` package installs the management tool that efficiently manages, monitors, and tunes large Postgres deployments from a single remote GUI console. | +| edb-pem-agent | The `edb-pem-agent` is an agent component of Postgres Enterprise Manager. | +| edb-pem-docs | Contains documentation for various languages, which are in HTML format. | +| edb-pem-server | Contains server components of Postgres Enterprise Manager. | +| pgadmin4 | Installs all required components to run pgadmin4 in desktop and web modes. Pgadmin4 is a management tool for Postgres capable of hosting the Python application and presenting it to the user as a desktop application. | +| pgadmin4-desktop | Installs pgadmin4 for desktop mode only. | +| pgadmin4-web | Installs pgadmin4 for web mode only. | +| pgadmin4-server | Installs pgadmin4's core server package. | +| libevent-edb | Contains supporting library files. | +| libiconv-edb | Contains supporting library files. | +| libevent-edb-devel | Contains supporting library files. | ## Debian/Ubuntu packages @@ -146,4 +134,3 @@ apt list edb* | edb-jdbc | No | Includes the .jar files needed for Java programs to access an EDB Postgres Advanced Server database. | | edb-migrationtoolkit | No | Installs Migration Toolkit, facilitating migration to an EDB Postgres Advanced Server database from Oracle, PostgreSQL, MySQL, Sybase, and SQL Server. | | edb-pgbouncer121 | No | PgBouncer, a lightweight connection pooler. This package requires the `libevent` package. | -| edb-efm40 | No | Installs EDB Failover Manager, which adds fault tolerance to database clusters to minimize downtime when a primary database fails by keeping data online in high availability configurations. | \ No newline at end of file diff --git a/product_docs/docs/epas/17/reference/sql_reference/01_sql_syntax/02_identifiers_and_key_words.mdx b/product_docs/docs/epas/17/reference/sql_reference/01_sql_syntax/02_identifiers_and_key_words.mdx index 2465e345378..012fc8a8ee6 100644 --- a/product_docs/docs/epas/17/reference/sql_reference/01_sql_syntax/02_identifiers_and_key_words.mdx +++ b/product_docs/docs/epas/17/reference/sql_reference/01_sql_syntax/02_identifiers_and_key_words.mdx @@ -12,7 +12,7 @@ redirects: Tokens such as `SELECT`, `UPDATE`, or `VALUES` are examples of *key words*, that is, words that have a fixed meaning in the SQL language. The tokens `MY_TABLE` and `A` are examples of *identifiers*. They identify names of tables, columns, or other database objects, depending on the command you use them in. Therefore, they're sometimes called *names*. Key words and identifiers have the same *lexical structure*, meaning that you can't know whether a token is an identifier or a key word without knowing the language. -SQL identifiers and key words must begin with a letter (`a-z` or `A-Z`). Subsequent characters in an identifier or key word can be letters, underscores, digits (`0-9`), dollar signs (`$`), or the number sign (`#`). +SQL identifiers and key words must begin with a letter (`a-z` or `A-Z`) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (`0-9`), dollar signs (`$`), or the number sign (`#`). However the dollar signs (`$`) are not allowed in identifiers according to the SQL standard, so their use might render applications less portable. The SQL standard will not be defining future keywords which contain digits or start/end with an underscore. This means that using identifiers with those attributes will be safe from conflicting with future versions of SQL. Identifier and key word names aren't case sensitive. Therefore these two commands are equivalent: diff --git a/product_docs/docs/lasso/4/configuration.mdx b/product_docs/docs/lasso/4/configuration.mdx index 5bcb4be31ab..e50b0348756 100644 --- a/product_docs/docs/lasso/4/configuration.mdx +++ b/product_docs/docs/lasso/4/configuration.mdx @@ -15,8 +15,8 @@ order, and uses the first match: 3. `$HOME/.edb-lasso.conf` 4. `/etc/edb-lasso.conf` -Alternatively, you can run Lasso with the `--config-file` option to -specify a configuration file not in the list above, for example: +To specify a configuration file not in this list, +run Lasso with the `--config-file` option. For example: ``` lasso --config-file /path/to/file.conf diff --git a/product_docs/docs/lasso/4/describe.mdx b/product_docs/docs/lasso/4/describe.mdx index 9fe30741864..d990e8cfa9d 100644 --- a/product_docs/docs/lasso/4/describe.mdx +++ b/product_docs/docs/lasso/4/describe.mdx @@ -2799,7 +2799,7 @@ No known security impact. ### Current checkpointer stats (`postgresql_checkpointer`) -Statistics about the checkpointer process's activity (from +Statistics about the checkpointer process activity (from `pg_stat_checkpointer`). **Report output:** diff --git a/product_docs/docs/lasso/4/install.mdx b/product_docs/docs/lasso/4/install.mdx index 65087f1c8d2..2497d20c2b0 100644 --- a/product_docs/docs/lasso/4/install.mdx +++ b/product_docs/docs/lasso/4/install.mdx @@ -14,7 +14,7 @@ the corresponding Linux installation option for your system from the [EDB Downloads page](https://www.enterprisedb.com/software-downloads-postgres). Or, you can install it directly from the [EDB repositories for Linux page](https://www.enterprisedb.com/repos). -Choose Lasso and following the installation instructions. +Choose Lasso and follow the installation instructions. After installing the EDB repository for your subscription on your system, you can install Lasso on Linux using the package manager tool @@ -51,16 +51,16 @@ name `edb-python39`) as the only dependency. If your system doesn't have internet access, then you need to download EDB Python and install it manually before installing Lasso. -The `edb-python39` package, on its turn, depends on the following packages: +The `edb-python39` package depends on the following packages: - `ncurses` - `openssl` - `readline` - `xz` -Which are already installed by default on most Linux distributions. +These packages are already installed by default on most Linux distributions. -If you have any issues installing Lasso or EDB Python, please reach out to +If you have any issues installing Lasso or EDB Python, contact EDB Support. @@ -83,16 +83,16 @@ If you try to run Lasso without a configuration file, this error occurs: ERROR: no configuration file for Lasso could be found. Please create a configuration file and try again. ``` -Lasso requires a configuration file, which can be one of the following -options. (It uses the first match.) +Lasso requires a configuration file, which can be one of the following. +(It uses the first match.) - `./edb-lasso.cfg` in the same directory where Lasso is running - `./edb-lasso.conf` in the same directory where Lasso is running - `$HOME/.edb-lasso.conf` - `/etc/edb-lasso.conf` -Alternatively, you can run Lasso with the `--config-file` option to -specify a configuration file not in the list above, for example: +To specify a configuration file not in this list, +run Lasso with the `--config-file` option. For example: ``` lasso --config-file /path/to/file.conf diff --git a/product_docs/docs/migration_portal/4/known_issues_notes.mdx b/product_docs/docs/migration_portal/4/known_issues_notes.mdx index 363495a7195..008cc8fc410 100644 --- a/product_docs/docs/migration_portal/4/known_issues_notes.mdx +++ b/product_docs/docs/migration_portal/4/known_issues_notes.mdx @@ -231,19 +231,17 @@ While using the Oracle default case, you may experience a lower compatibility ra Character: 58 ``` -### Incomplete Object Definition +### Incomplete object definition -While assessing source schemas with Migration Portal, in rare scenarios, the converted Object Definitions are incomplete when the source DDL contains reserved words. +While assessing source schemas with Migration Portal, in rare scenarios, the converted object definitions are incomplete when the source DDL contains reserved words. -If you encounter an issue where some part of the Object Definition is missing or the definition gets terminated before reaching the actual end of the statement, you are possibly using keywords reserved by EDB Postgres Advanced Server. For example, when you use `CONSTRAINT` as a column name in a `TABLE` definition and then reference it in `VIEW` or `MVIEW` definitions, Migration Portal could terminate that DDL statement abruptly and skip to the next definition without successfully assessing or converting it. +If you encounter an issue where some part of the object definition is missing or the definition gets terminated before reaching the actual end of the statement, you might be using keywords reserved by EDB Postgres Advanced Server. For example, when you use `CONSTRAINT` as a column name in a `TABLE` definition and then reference it in `VIEW` or `MVIEW` definitions, Migration Portal might terminate that DDL statement abruptly and skip to the next definition without successfully assessing or converting it. -To work around this issue, you have these options: +To work around this issue, you can either: - Rename the column name in the Oracle database, then reextract the DDL and upload it to Migration Portal. -or - -- Rename the column name in the extracted DDL file, and then upload it to Migration Portal. +- Rename the column name in the extracted DDL file and then upload it to Migration Portal. ## EDB DDL Extractor diff --git a/product_docs/docs/migration_toolkit/55/installing/installing_jdbc_driver.mdx b/product_docs/docs/migration_toolkit/55/installing/installing_jdbc_driver.mdx index 8e69dbf6597..a5d4390fd11 100644 --- a/product_docs/docs/migration_toolkit/55/installing/installing_jdbc_driver.mdx +++ b/product_docs/docs/migration_toolkit/55/installing/installing_jdbc_driver.mdx @@ -8,7 +8,7 @@ Migration Toolkit requires Java version 1.8.0 or later. ## Choosing a driver -Which JDBC drivers you use depends on the databases you are migrating from and to. For example, if you are migrating from Oracle to EDB Postgres Advanced Server, you will need the Oracle JDBC driver and the EDB JDBC driver. +Your selection of the JDBC drivers to use depends on the databases you're migrating from and to. For example, if you're migrating from Oracle to EDB Postgres Advanced Server, you need the Oracle JDBC driver and the EDB JDBC driver. - If you're migrating to or from EDB Postgres Advanced Server, use the EDB JDBC driver. To download the latest driver, see [EDB Connectors](https://enterprisedb.com/software-downloads-postgres#edb-connectors) on the EDB Downloads page. For installation instructions, see [Installing and configuring EDB JDBC Connector](/jdbc_connector/latest/installing/). @@ -17,14 +17,14 @@ Which JDBC drivers you use depends on the databases you are migrating from and t - If you're migrating to or from PostgreSQL, use the PostgreSQL JDBC driver. To download the latest supported driver, see the [JDBC drivers section](https://jdbc.postgresql.org/download/) on the PostgreSQL Downloads page. -- If you're migrating from Oracle, MySQL, Microsoft SQL Server, or Sybase, use the freely available source-specific JDBC driver. +- If you're migrating from Oracle, MySQL, Microsoft SQL Server, or Sybase, use the freely available, source-specific JDBC driver: - [Oracle JDBC](https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html) - [MySQL JDBC](https://dev.mysql.com/downloads/connector/j/) - [Microsoft SQL Server JDBC](https://learn.microsoft.com/en-us/sql/connect/jdbc/release-notes-for-the-jdbc-driver?view=sql-server-ver16#102) - [Sybase ASE (jTDS) JDBC](https://sourceforge.net/projects/jtds/files/) !!! Note - The open-source jTDS driver also supports older versions of Microsoft SQL Server (version 2012 and earlier) and may be used with Migration Toolkit. The Microsoft-provided JDBC driver for SQL Server is recommended for the newer versions of SQL Server supported by Migration Toolkit. + The open-source jTDS driver also supports older versions of Microsoft SQL Server (version 2012 and earlier) and can be used with Migration Toolkit. We recommend the Microsoft-provided JDBC driver for SQL Server for the newer versions of SQL Server supported by Migration Toolkit. ## Adding the driver to `lib` After downloading the driver, move the driver file into the `/lib` directory. diff --git a/product_docs/docs/pem/9/profiling_workloads/installing_sql_profiler.mdx b/product_docs/docs/pem/9/profiling_workloads/installing_sql_profiler.mdx index ce6cd2672cc..3b1d04d8905 100644 --- a/product_docs/docs/pem/9/profiling_workloads/installing_sql_profiler.mdx +++ b/product_docs/docs/pem/9/profiling_workloads/installing_sql_profiler.mdx @@ -41,7 +41,7 @@ Before you begin the installation process: ### Install the package -The syntax for the install command is: +The syntax to install SQL Profiler on EDB Postgres Advanced Server and EDB Postgres Extended is: ```shell sudo -y install edb--server-sqlprofiler @@ -49,7 +49,7 @@ sudo -y install edb--server-sqlpro Where: -- ``is the package manager used with your operating system: +- `` is the package manager used with your operating system: | Package manager | Operating system | | --------------- | -------------------------------- | @@ -59,23 +59,33 @@ Where: - `` is the distribution of Postgres you're using: - | Postgres distribution | Value | - | ---------------------------- | ---------- | - | PostgreSQL | pg | - | EDB Postgres Advanced Server | as | + | Postgres distribution | Value | + |------------------------------|------------------| + | EDB Postgres Advanced Server | as | | EDB Postgres Extended | postgresextended | - `` is the version of Postgres you're using. -For example, to install the latest version of SQL Profiler for EDB Postgres Advanced Server 15 on a RHEL 8 platform: +For example, to install the latest version of SQL Profiler for EDB Postgres Advanced Server 15 on a RHEL 8 platform: ```shell sudo dnf -y install edb-as15-server-sqlprofiler ``` +The syntax to install SQL Profiler on PostgreSQL is: -## Enabling the extension +```shell +# For RHEL 8 and its derivatives: +sudo dnf -y install sqlprofiler_ + +# For Debian/Ubuntu: +apt-get -y install postgresql--sqlprofiler +``` +Where `` is the version of PostgreSQL you're using. + + +## Enabling the extension To enable the extension: