ApsaraDB / PolarDB-for-PostgreSQL

A cloud-native database based on PostgreSQL developed by Alibaba Cloud.
https://apsaradb.github.io/PolarDB-for-PostgreSQL/zh/
Apache License 2.0
2.89k stars 480 forks source link

[Question] Fail to load customization postgres extension #471

Closed Zrealshadow closed 9 months ago

Zrealshadow commented 9 months ago

Describe the problem I deploy the Polar-DB through docker. In this docker development environment, I developed a postgres extension' source code. Then through pg_config and pgxs, I can successfully install my own postgres extension.

Now I execute cmd to connect to polardb outof docker container. docker run -it --rm polardb/polardb_pg_local_instance psql
I can not execute CREATE EXTENSION {MYEXTENSION}; It raise ERROR: could not open extension control file "/home/postgres/tmp_basedir_polardb_pg_1100_bld/share/extension/{extension}.control": No such file or directory

However, it I connect to polardb in docker container. I can successfully CREATE my extension. ...

polardb-bot[bot] commented 9 months ago

Hi @Zrealshadow ~ Thanks for opening this issue! 🎉

Please make sure you have provided enough information for subsequent discussion.

We will get back to you as soon as possible. ❤️

mrdrivingduck commented 9 months ago

@Zrealshadow Welcome your testing of PolarDB-PG.

Like you said, if you run docker run -it --rm polardb/polardb_pg_local_instance psql, it means that you are starting a brand new container from the image, so that there cannot be any extension you installed manually.

Zrealshadow commented 9 months ago

Thx, I thought it only starts a psql client.

Zrealshadow commented 9 months ago

Can I just use postgres psql to connect PolarDB server ?

Zrealshadow commented 9 months ago

Can I just use postgres psql to connect PolarDB server ?

it's ok