78 questions
2
votes
0
answers
76
views
How to stop Background Worker?
I have my extension and start background worker in the PG_init proc
BackgroundWorker worker;
/* set up common data for worker */
memset(&worker, 0, sizeof(worker));
snprintf(worker.bgw_name, ...
1
vote
0
answers
43
views
"Error loading PostgreSQL extension DLL: 'The specified module could not be found'"
I have written a PostgreSQL extension in C that uses the GSL (GNU Scientific Library) in MSYS2 Environment to calculate factorials. The code compiles successfully,
Acer@LAPTOP-70JE12O9 MSYS /c/Users/...
1
vote
2
answers
114
views
Why do I received a "invalid byte sequence " when calling a function through pg_background (encoding WIN1252)?
I am encountering a character encoding issue when using the pg_background extension for PostgreSQL.
The issue occurs in a Windows/PostgreSQL 15 environment, with the raise notice statement.
To explain ...
1
vote
1
answer
1k
views
How do I add pg_repack to a Postgres container?
I need to create a custom Postgres Docker container with many plugins. So far, I've gotten only one of them working. Another, pg_repack, is giving me grief.
So far, here is what I've got for my ...
-1
votes
1
answer
281
views
postgresql passwordcheck.so: undefined symbol : plain_crypt_verify
i'm tring to add shared_preload_libraries='$libdir/passwordcheck' on postgresql.conf.
the version is 9.2.13 and there's no passwordcheck module in this version.
so i brought passwordcheck.so from 12 ...
0
votes
1
answer
110
views
Why PostgreSQL extension was not dumped when created from `/docker-entrypoint-initdb.d/*` script?
I created extensions from /docker-entrypoint-initdb.d/* script like this:
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname db <<EOSQL
CREATE EXTENSION citext;
CREATE ...
0
votes
1
answer
778
views
How to install PL/Python on Postgres (Homebrew)
I have installed Postgresql@14 on my system using homebrew. I want to install pl/python on my database but on running the command CREATE EXTENSION plpython3u;
ERROR: could not open extension control ...
1
vote
1
answer
84
views
Error while implementing Custom Operator in Postgresql
Creating a Simple Custom Operator in my Postgres Extension pg_sample_ext, but when implementing it in the database getting an error. The code for the update script and error are mentioned below.
...
0
votes
1
answer
891
views
Unable to create PostGIS extension
I am working on a CentOS 7 server with PostGIS 3.2 installed.
When I try to create the PostGIS extension using CREATE EXTENSION postgis;, I get the following error:
ERROR: could not load library &...
1
vote
0
answers
1k
views
ALTER EXTENSION ERROR : extension "my_extension" has no update path from version "1.0.0" to version "1.0.1"
Trying to implement ALTER EXTENSION on custom extension my_extension.
Made the following changes:
Created a new file my_extension--1.0.1.sql
I changed the code of the control file:
default_version = ...
0
votes
1
answer
161
views
Regression testing Issue [make installcheck]
For the regression tests:
The code for the makefile is:
EXTENSION = my_extension
DATA = my_extension--1.0.sql
REGRESS = my_extension--regress.sql
PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) -...
1
vote
2
answers
1k
views
Postgresql doesn't working with Citus and pg_stat_statements at the same time
So, I built the PostgreSQL with citus extension in docker.
I use the official documentation in citus, then I run this command in the terminal.
docker run -d --network citus-network --name ...
1
vote
1
answer
2k
views
Correct way of installing postgresql extension with custom library
TL;DR
One has to compile their custom library as shared library:
gcc -c -fPIC warp_client.c -o warp_client.o
gcc -shared warp_client.o libwarp-client.so
Include the shared library and additional ...
0
votes
2
answers
952
views
PostgreSQL C function to get values
I am trying to write a PostgreSQL function in C.
My goal is finding minimum value of a list. So, my function will be executed like these:
SELECT min_to_max(val) FROM (VALUES(1),(2),(3)) x(val);
SELECT ...
2
votes
1
answer
5k
views
Install postgres extension with schema
I am trying to install pgcrypto in pg_catalog schema. But this does not work with postgres 13 or higher since the function gen_random_uuid is globally available. How can I still create my extension?
I ...
1
vote
1
answer
593
views
psql: display functions with \df that do *not* contain a certain pattern
Because I installed dblink extension into the (default) public schema, \df will display all the dblink related functions. I only want to view customized function.
How can I see function that not ...
-1
votes
1
answer
72
views
Compiling PostgreSQL extension, getting "error: ‘work_mem’ undeclared (first use in this function)"
When I compile the extension I've got, I'm getting
error: ‘work_mem’ undeclared (first use in this function)
17 | Tuplestorestate *tupstore = tuplestore_begin_heap(true, false, work_mem);
What ...
1
vote
0
answers
980
views
How can I use pg_proctab extension in AWS Aurora for Monitoring purpose?
I have recently came across this pg_proctab extension through which we should be able to get the details of OS stats. However I am unable to get the value out of the functions built by this extension, ...
5
votes
0
answers
762
views
How to start pg_cron extension after shutdown
Had to terminate a process run by pg_cron. However, after doing that pg_cron extension stopped. Below is the log from the server:
2021-04-29 12:55:40.712 UTC [535529] LOG: pg_cron scheduler shutting ...
5
votes
1
answer
2k
views
Connection failed with pg_cron extension
Need help with pg_cron extension: I'm using it for the first time: it is failing for me with 'connection failed' error. I have followed all https://github.com/citusdata/pg_cron mentioned instructions. ...
0
votes
0
answers
126
views
Postgres custom parallel aggregation extension in C, shared state?
I am creating a Postgres C extension that is a parallelized aggregate function. Is there any way I can share the state, or any any state/memory-block I choose, among all the workers? I dont want each ...
4
votes
1
answer
4k
views
How to install external extensions in GCP's PostgreSQL
I see here that only allowed extensions can be installed on PostgreSQL in Google Cloud Platform. Is there any possibility to add an extension that is not listed in supported extensions? The extension ...
0
votes
1
answer
2k
views
How to install pgxn with correct PostgreSQL version?
On sudo -H pgxn install semver, ERROR about wrong PostgreSQL version (it is v10 not v12),
INFO: best version: semver 0.20.3
INFO: saving /tmp/tmpba6hta5a/semver-0.20.3.zip
INFO: unpacking: /tmp/...
0
votes
1
answer
2k
views
ERROR: incompatible library while creating extension in Postgresql
I use Centos 7 and Postgresql 12. I installed already PostGIS and created successfully its extension. I'm now tring to install semver extension with create extension semver and get following error:
...
0
votes
1
answer
231
views
PostgreSQL parallel queries using SPI possible?
I am using PostgreSQL's Server Programming Interface (SPI) to build my postgres extension and execute my query. Please see this detailed example, or the following simple code sample:
int ret = ...