|From:||Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>|
|To:||Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>|
|Cc:||Huong Dangminh <huo-dangminh(at)ys(dot)jp(dot)nec(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Hiroshi Yanagisawa <hir-yanagisawa(at)ut(dot)jp(dot)nec(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>|
|Subject:||Re: User defined data types in Logical Replication|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Masahiko Sawada wrote:
> Regarding to regression test, I added a new test module
> test_subscription that creates a new user-defined data type. In a
> subscription regression test, using test_subscription we make
> subscriber call slot_store_error_callback and check if the subscriber
> can correctly look up both remote and local data type strings. One
> downside of this regression test is that in a failure case, the
> duration of the test will be long (up to 180sec) because it has to
> wait for the polling timeout.
> Attached an updated patch with a regression test.
Pushed the fix to pg10 and master. Thanks to all involved for the
report, patches and review.
Here's the regression test patch. The problem with it is that the TAP
test is not verifying much -- I tried applying it before the fix commit,
and it succeeds! The only funny is that the errcontext messages are
wrong, they look like this:
2018-03-14 20:31:03.564 -03  LOG: input int: 1
2018-03-14 20:31:03.564 -03  CONTEXT: processing remote data for replication target relation "public.test" column "b", remote type dummytext, local type dummyint
2018-03-14 20:31:03.564 -03  LOG: input text: "one"
2018-03-14 20:31:03.564 -03  CONTEXT: processing remote data for replication target relation "public.test" column "a", remote type dummyint, local type dummytext
but I think it would be better to verify them. (With your version I
think you were trusting that the OID would not match anything, giving
raise to the "cache lookup failed" error before the patch. I'm not sure
that that's very trustworthy either.)
I think this is a worthwhile test, but IMO it should be improved a bit
before we include it. Also, we can come up with a better name for the
test surely, not just refer to this particular bug. Maybe "typemap".
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
|Next Message||Alvaro Herrera||2018-03-15 00:43:59||Re: User defined data types in Logical Replication|
|Previous Message||Tomas Vondra||2018-03-15 00:31:19||Re: [HACKERS] PATCH: multivariate histograms and MCV lists|