Re: Keeping state in a foreign data wrapper

2020-08-11 Thread Laurenz Albe
On Mon, 2020-08-03 at 19:23 +0300, Stelios Sfakianakis wrote: > I am trying to implement a FDW in Postgres for accessing a web api and I > would > like to keep information like for example the total number of requests > submiited. > Ideally these data should be kept “per-user” and of course wi

Re: Keeping state in a foreign data wrapper

2020-08-10 Thread Ian Barwick
On 2020/08/04 19:21, Stelios Sfakianakis wrote: > Thank you again, I have another question in order to make sure I have a clear understanding: > > >> On 4 Aug 2020, at 11:24, Ian Lawrence Barwick wrote: >> >> The hash table is specific to each running backend so will only be >> accessed by that

Re: Keeping state in a foreign data wrapper

2020-08-10 Thread Ian Barwick
On 2020/08/04 19:21, Stelios Sfakianakis wrote: > Thank you again, I have another question in order to make sure I have a clear understanding: > > >> On 4 Aug 2020, at 11:24, Ian Lawrence Barwick wrote: >> >> The hash table is specific to each running backend so will only be >> accessed by that

Re: Keeping state in a foreign data wrapper

2020-08-04 Thread Stelios Sfakianakis
Thank you again, I have another question in order to make sure I have a clear understanding: > On 4 Aug 2020, at 11:24, Ian Lawrence Barwick wrote: > > The hash table is specific to each running backend so will only be > accessed by that process. > > Pre-loading a shared library just gives th

Re: Keeping state in a foreign data wrapper

2020-08-04 Thread Ian Lawrence Barwick
2020年8月4日(火) 14:54 Stelios Sfakianakis : > On 4 Aug 2020, at 06:25, Ian Lawrence Barwick wrote: > > 2020年8月4日(火) 1:24 Stelios Sfakianakis : > > Hi, > >>> I am trying to implement a FDW in Postgres for accessing a web api and I >>> would like to keep information like for example the total number

Re: Keeping state in a foreign data wrapper

2020-08-03 Thread Stelios Sfakianakis
Thank you Ian for the prompt reply! I will certainly have a look at pg_stat_statements I also came across mysql_fdw (https://github.com/EnterpriseDB/mysql_fdw ) that features a connection pool shared across queries. It uses a hash table with the server

Re: Keeping state in a foreign data wrapper

2020-08-03 Thread Ian Lawrence Barwick
2020年8月4日(火) 1:24 Stelios Sfakianakis : > > Hi, > > I am trying to implement a FDW in Postgres for accessing a web api and I > would like to keep information like for example the total number of requests > submiited. Ideally these data should be kept “per-user” and of course with > the proper l