Replies: 2 comments 1 reply
-
Hi @augcollet ! Your singleton approach will resolve the missing cached tables -- for a bit of background there, when you call Postgres' temporary tables are bound to a given Postgres session, so that's why you can't see them in a separate connection instance. If you want tables to persist between sessions and between connections, you need to pass the expression to We don't keep track of the (persistent / non-temp) tables that we create -- they're accessible via the As for the table creation issue -- that's strange behavior and Postgres is (famously) quite robust -- are you inserting huge quantities of data into postgres? The more detail you can provide, the better chance we have of helping to diagnose the issue. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
We use Ibis quite intensively within a solution that we develop in my company, with a postgresql backend. In particular, we have embedded certain features in a module so that the connection to our database is transparent for developers.
We then use our module every time we need to communicate with our Database.
Sometimes, we encounter problems that are quite complicated to resolve:
[1] We use .cache method on a table under construction and then, later, it is no longer accessible by its instance: "ibis_cached_[...] does not exist".
[2] We push a table into our database via Ibis functions (create_table, insert etc.), but we have a message "[...] does not exist" when we try to read it a little later in the process.
Unfortunately, despite multiple attempts, I have never managed to reproduce one of these problems in a minimal example case. However, when the problem appears during the development of a module, it is always reproducible in this specific situation (I just can't reproduce it in isolation).
Since we often use ibis across several modules, I thought that this kind of problem could occur in the case where we do not rigorously use the same Ibis connection instance everywhere.
Example: In a module A I create an Ibis connection, I cache a table during the execution of a function of the module; this cached table is transmitted to another module B (in which another Ibis connection has been created, therefore another instance), module B is unable to use the cached table because it does not exist for it.
As a solution, I set up a singleton via the syntax that I found here https://stackoverflow.com/a/12305404):
Since then, the problem [1] has not reproduced. However, the problem [2] continues to appear in certain situations. Recently this happened :
All this is very obscure and I am aware that it will be complicated to give me any help without being able to provide a minimal reproducible example. However, do the behaviors I describe mean anything to you? Do you have a lead to explore? Do you perhaps have some information on the management of the lifecycle of connections via Ibis that could explain this? In particular, how is the cataloging of tables created/deleted during a process managed by Ibis, which could explain why it is sometimes unaware of the existence of tables/caches that it has created itself?
Thank you in advance, any help is welcome.
Regards,
Beta Was this translation helpful? Give feedback.
All reactions