Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about redis_wrapper as foreign server #33

Open
DeoLeung opened this issue Dec 25, 2021 · 1 comment
Open

question about redis_wrapper as foreign server #33

DeoLeung opened this issue Dec 25, 2021 · 1 comment

Comments

@DeoLeung
Copy link

Hi, I want to comment redis_wrapper but the issue button is grey :(

I want to use it as a trigger to sync db data into redis as cache.

In such scenario, it will be great if the redis server could be implemented as foreign server instead of connect/disconnect functions.

Is there any plan to support this feature or is there any workaround to achieve it at the moment?

Why redis_fdw can't be used is that we have hashes like account:$id for each row in table account, using redis_fdw needs to create foreign table each time :(

Thanks

@DeoLeung
Copy link
Author

argh I played around it and found that redis_connect shall be creating a connection in pool :)

create extension redis;
select redis_connect(0, 'localhost', 6379, '', 0);
select redis_command_argv(0, 'SET', 'from_db', 'hahahha');
select redis_command_argv(0, 'GET', 'from_db');

another question, will it do auto reconnect and persist across session/connection? if so I can just open it once and leave it running forever :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant