-
Notifications
You must be signed in to change notification settings - Fork 32
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
Doesn't work with Elasticsearch v6 without a tweak #3
Comments
Hi,
Thanks for writing up your experiences. I'm on holiday at the moment and will address your recommendations when I return.
…On 13 August 2019 22:44:29 CEST, Kevin Murphy ***@***.***> wrote:
For posterity, I was able to get this to "work" with PostgreSQL 10 and
Elasticsearch 6 by pinning the version of the `elasticsearch` package
dependency (in `setup.py`, and `requirements.txt` for consistency).
Without pinning the version, `elasticsearch` v7 is installed, which
only works with Elasticsearch 7+.
The Dockerfile I used:
```
FROM postgres:10-alpine
RUN apk add --no-cache \
python2 \
python2-dev \
py2-pip
RUN apk add --no-cache build-base
RUN pip install pgxnclient
RUN pgxn install multicorn
RUN pip install pg_es_fdw
ENTRYPOINT ["docker-entrypoint.sh"]
EXPOSE 5432
CMD ["postgres"]
```
I haven't run the full tests yet, but simple `insert`, `delete`, and
`select` are working for me.
The documentation is pretty good, but I think it could be tweaked to
make it even more clear up-front that quite likely you will have to
accommodate your particular version Elasticsearch in addition to
PostgreSQL and the most recent Multicorn that goes with your version of
PostgreSQL.
Along with this, it would be better if the repo was configured to work
with a particular set of versions, and those versions were clearly
spelled out.
BTW, the current version of Multicorn (1.3.5 from 2018) is compatible
with PostgreSQL 10 but *not* PostgreSQL 11.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#3
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
This is not a solution to the issue raised in #3, this is a way to get things in order before addressing that ticket. At this point the tests pass. The next steps are to: * Drop support for expired versions of Postgres. * Add support for new versions of Postgres. * Resolve issue with Multicorn dependency. * Test against supported versions of Elasticsearch. * Document requirement to pin Elasticsearch dependency.
I've worked on this a bit tonight.
I think that the version of multicorn installed by I'm going to look into improving the test setup as it is quite manual. |
@matthewfranglen Hey, thanks for your work on this. The Multicorn version I got from pgxn.org, in particular https://pgxn.org/dist/multicorn/. I admit it is strange since the GitHub repo only goes up to 1.3.4. |
I think this work resolves Issue #3. As the code has changed a new version must be released.
I think this work resolves Issue #3. As the code has changed a new version must be released.
That's interesting! When I look at the github page I can see that there is a badge for 1.3.5 as well. Perhaps they are just not using tags to track that information anymore. I have worked on this a bit more and the tests now run against different versions of Elastic Search (5, 6 and 7). I've documented this in the README near the top, with instructions to install the I've released a new version as the client API changes slightly for Elastic Search 7. If you have any further suggestions please let me know, otherwise I feel this issue can be closed. |
Fantastic; I agree it can be closed now. These little improvements will have a big impact on the usability of this extension. There is a PG wiki entry on FDWs that points to a different and "archived" Elasticsearch FDW repo on GitHub. I would like to change it tomorrow to point to yours. |
Sounds great! Thanks for opening this ticket 😸 |
Done. https://wiki.postgresql.org/wiki/Foreign_data_wrappers#Big_Data_Wrappers |
For posterity, I was able to get this to "work" with PostgreSQL 10 and Elasticsearch 6 by pinning the version of the
elasticsearch
package dependency (insetup.py
, andrequirements.txt
for consistency). Without pinning the version,elasticsearch
v7 is installed, which only works with Elasticsearch 7+.The Dockerfile I used:
I haven't run the full tests yet, but simple
insert
,delete
, andselect
are working for me.The documentation is pretty good, but I think it could be tweaked to make it even more clear up-front that quite likely you will have to accommodate your particular version Elasticsearch in addition to PostgreSQL and the most recent Multicorn that goes with your version of PostgreSQL.
Along with this, it would be better if the repo was configured to work with a particular set of versions, and those versions were clearly spelled out.
BTW, the current version of Multicorn (1.3.5 from 2018) is compatible with PostgreSQL 10 but not PostgreSQL 11.
The text was updated successfully, but these errors were encountered: