vidardb / pgrocks-fdw

Bring RocksDB to PostgreSQL as an extension. It is the first foreign data wrapper (FDW) that introduces LSM-tree into PostgreSQL. The underneath storage engine can be RocksDB. The FDW also serves for VidarDB engine, a versatile storage engine for various workloads. See the link for more info about VidarDB engine.
https://www.vidardb.com
Apache License 2.0
122 stars 11 forks source link

Get message "ERROR: KVCtrlChannel ShmOpen failed" #39

Open Zzzzzzzzzzzzzzzzz opened 3 years ago

Zzzzzzzzzzzzzzzzz commented 3 years ago

Hi, I get the following error while trying the “usage” section of the readme:

create extension kv_fdw;

~~~~~~~~~~~~~~~LaunchKVManager~~~~~~~~~~~~~~~

-----------------kv_fdw_validator----------------------
CREATE EXTENSION
CREATE SERVER kv_server FOREIGN DATA WRAPPER kv_fdw;  

-----------------kv_fdw_validator----------------------
CREATE SERVER
CREATE FOREIGN TABLE student(id INTEGER, name TEXT) SERVER kv_server;  

-----------------kv_fdw_validator----------------------
CREATE FOREIGN TABLE
INSERT INTO student VALUES(20757123, 'Rafferty');  

-----------------kv_fdw_handler----------------------

-----------------PlanForeignModify----------------------

-----------------kv_fdw_handler----------------------

-----------------BeginForeignModify----------------------
2021-01-08 19:57:41.236 CST [28571] ERROR:  KVCtrlChannel ShmOpen failed
2021-01-08 19:57:41.236 CST [28571] STATEMENT:  INSERT INTO student VALUES(20757123, 'Rafferty');
ERROR:  KVCtrlChannel ShmOpen failed

Postgres version is the latest REL_12_STABLE branch. Where could I get more details about this failure? Is it a code issue? Thanks!

jsc0218 commented 3 years ago

Hi, I cannot reproduce the error in my side. It seems the component using shared memory doesn't start successfully in your env. I just did a new commit with error info, could you pull the commit, rerun it and then paste the debug info here?

Thanks.

xingweitian commented 3 years ago

Hi @Zzzzzzzzzzzzzzzzz, thanks for the report.

Could you please confirm that you set shared_preload_libraries to 'kv_fdw' in the postgresql.conf and then restart the postgres?

From the document:

Before using this foreign data wrapper, we need to add it to shared_preload_libraries in the postgresql.conf:

sudo bash -c 'echo "shared_preload_libraries = 'kv_fdw'" >> /etc/postgresql/12/main/postgresql.conf'

and restart PostgreSQL:

sudo service postgresql restart
xingweitian commented 3 years ago

@Zzzzzzzzzzzzzzzzz, are there any updates?

xingweitian commented 3 years ago

I am going to close this issue since there is no further update.

youngerking1985 commented 2 years ago

I produce this issue because forget set shared_preload_libraries to 'kv_fdw' in the postgresql.conf. after set shared_preload_libraries and restart pg, success.