-
Notifications
You must be signed in to change notification settings - Fork 49
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
Upgrade Postgres driver #407
Comments
Dear @c0c0n3 and @chicco785, on this matter, and maybe also related to crate/crate-python#397 as well as crate/sqlalchemy-cratedb#90, I would like to encourage you to use
If you don't want to depend on PostgreSQL headers for building With kind regards, P.S.: When looking at implementations for asyncio and friends, |
@amotl excellent, thank you so much for this, very valuable info indeed. Do you know by any chance what the Crate client does w/r/t connection pooling? We're using the HTTP client, so perhaps connection pooling gets delegated to |
Dear @c0c0n3,
Exactly. I've shared some thoughts about this at crate/sqlalchemy-cratedb#90, coming from a question by @chicco785.
That's true. CrateDB support for the PostgreSQL wire protocol is there [1] and we are continuously working on improving on the SQL syntax side and other details in this regard which happen on top of the wire protocol. With kind regards, [1] https://crate.io/docs/crate/reference/en/4.3/interfaces/postgres.html |
P.S.: As I've learned you might be looking into SQLAlchemy: Because of the document-oriented features of CrateDB and probably other details, the integration with SQLAlchemy needs a CrateDB SQLAlchemy dialect. I've just created crate/sqlalchemy-cratedb#100 for exploring the aspect of using it together with Regarding your comments at: PerformanceAn ORM will always impose some overhead. So, for raw insert performance, one might always choose to do direct inserts. However, even when using the SQLAlchemy engine for connecting to the database [1], you can skip the ORM layer by directly executing SQL statements, as outlined at [2]. Apart from that, as I've stated at crate/crate-python#391 (comment), the upcoming SQLAlchemy 1.4 will apparently improve significantly on the performance aspects:
Geospatial type supportWhile @chicco785 referenced crate/sqlalchemy-cratedb#118 at #315 (comment) the other day, [1] https://docs.sqlalchemy.org/en/13/core/engines.html |
@amotl thank you so much for the update! sorry i missed crate/crate-python#391. you're giving us a lot of very valuable feedback and advice, we're really grateful for that. also im very excited about recent development on the sql alchemy front, good stuff!! |
Stale issue message |
Is your feature request related to a problem? Please describe.
Starting from version
1.16.6
,pg8000
has dropped thePGJsonb
class. This breaks the Timescale translator so we pinned thepg8000
version in the Pipfile to1.16.5
---the last version to ship with thePGJsonb
class. Also,pg8000
doesn't come with connection pooling.Describe the solution you'd like
See how difficult it'd be to switch to Psycopg. It shouldn't be hard actually. Notice Psycopg has built-in connection pooling.
Describe alternatives you've considered
Stick with
pg8000
, just replacePGJsonb
withjson.dump
. Quick solution, but then we'd still need a solution for connection pooling...Additional context
See also: crate/crate-python#397
The text was updated successfully, but these errors were encountered: