Skip to content
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

Multicorn2 now offers support for pg15 #33

Closed
luss opened this issue Sep 9, 2022 · 3 comments
Closed

Multicorn2 now offers support for pg15 #33

luss opened this issue Sep 9, 2022 · 3 comments

Comments

@luss
Copy link

luss commented Sep 9, 2022

please now test esfdw on pg15.

@matthewfranglen
Copy link
Owner

Sorry about the delay! I'll have a look at this now.

@matthewfranglen
Copy link
Owner

matthewfranglen commented Sep 17, 2022

So, I have a PostgreSQL 15beta4 Dockerfile that I can install the foreign data wrapper in using Multicorn 2. When I run the tests I get a very unusual result. The delete test for this fails. The foreign data wrapper delete function is invoked through the statement:

DELETE FROM articles_es_returning
WHERE id = 39357158
RETURNING id, title;

(file)

The schema for the foreign data wrapper indicates that the id column is id. Looking at the Multicorn 1 documentation the requirements for implementing the write api is:

In multicorn, this involves defining which column will be used as a primary key (mandatory) and implementing the following methods at your discretion:

def insert(self, new_values)
def update(self, rowid, new_values)
def delete(self, rowid)

The error message indicates that the delete method is being invoked with a rowid of 0 instead of 39357158. This leads to the error:

PostgreSQL 14 with Elasticsearch 7: Test delete returning row - FAIL
WARNING:  SEARCH for /article-index row_id 0 returned nothing
ERROR:  DELETE for /article-index/0 failed: NotFoundError(404, '{"_index":"article-index","_type":"_doc","_id":"0","_version":1,"result":"not_found","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":103,"_primary_term":1}') 

(code)

It also fails in PostgreSQL 14 but it passes in PostgreSQL 13, both of which use Multicorn 2.

The failing images (PostgreSQL 14 and 15beta4) require clang-11 as one of the apt dependencies in order to compile Multicorn 2. What's interesting is that the PostgreSQL 13 does not require this dependency and I have rebuilt it from scratch to check this.

@matthewfranglen
Copy link
Owner

0.12.0 uses multicorn 2 to manage the extension for PostgreSQL versions 13, 14, and 15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants