SQLite Forum

C/C++ API: Is it posiible to clone database connection?
> Your dummy, no-real-changes editing makes me want to just block you. ...

Impressive. I forgot that this forum engine sorts threads also by edit data. It's an unusual behaviour. I'm used to editing posts if I think it's necessary. Next time I'll use Stack Overflow in order not to annoy you. 

> keeping them in a pool

Assume the app has 2 tabs and therefore two connections in the pool. In first tab user writes `attach database a.sqlite` or `pragma synchronous = 0`. He will expect that these changes will be applyed to both tabs. But there is no mechanizm to sync them. And that is why I can't use "by using common code to get connections to the configuration you want".

> The real problem is not management of data held by some sqlite3 struct(s); it is management of the resources referenced by the struct(s)

I don't want to get a real copy. I need the same runtime configuration. I can achieve it by next steps:

1. Read all pragmas state (or most used and reject others).
2. Read all attached databases
3. Apply all pragmas to a new connection 
4. Attach databases 
5. Load extensions for the new connection

But it is a lot of work for me and sqlite. I thought there is a simple way. It does not exist. ОК.