-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add pipeline mode API #42
Conversation
-- point in pipeline mode, requested by | ||
-- 'pipelineSync'. This status occurs only | ||
-- when pipeline mode has been selected. | ||
| PipelineAbort -- ^ The 'Result' represents a pipeline that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a name clash between PGRES_PIPELINE_ABORTED
and PQ_PIPELINE_ABORTED
I updated CI to use Ubuntu 22.04 (Jammy) to provide libpq version 14 -- clearly that doesn't really solve the versioning question. (There's some failures now on older GHC versions: It looks like there's some incompatiblity between Ubuntu 22.04 and the |
@phadej Hi! Can you help us get this merged? |
I'm unsure. The versioning question is hard. There are options:
And there are variants:
Opinions? |
I may be wrong, but I think that unless the functions that aren't supported by the old libpq actually get used, things will work fine. If that's correct then there seems to be no need for the flags. Instead stating this clearly in the docs shall be enough. |
Even if I do
things fail. So when linker decides to load symbols is not very predicatable. I'd expect static builds to fail, except in very happy situations where dead code elimination can actually prune everything mentioning "new" functions. |
Thanks for the clarification! How about using the flag but have it default to requiring the latest libpq? Thus the library will effectively apply the following strategy:
Which seems like an essential requirement for this library and the whole downstream ecosystem to evolve. However it will also leave the alternative option available for hackers willing to use the older version. |
@nikita-volkov that's my option
isn't it? |
If it implies that the default is to enable the new functions, then it is. |
Posted version with cabal flag to support older libpq versions. |
Closing this one in favour of #52 (but feel free to reopen if that seems like a better idea) |
This wraps the pipeline mode API, introduced in PostgreSQL 14: https://www.postgresql.org/docs/current/libpq-pipeline-mode.html
I'm not sure how the version requirement should be handled.
(For the moment we're using this experimentally here: PostgREST/postgrest#2707.)