Hello,
have you tried 10.7.1?
I do not know if we have just encounterd the same problem, but (with ArcGIS/geodatabase 10.6.1 on PostgreSQL 10 on RHEL 6.9) some feature classes (not all feature classes) could not be displayed by ArcMAP/ArcCatalog
It always ended with disconnect of all postgresql connections and same error message appeared in postgresql log.
In our case problem was in following spatial selection using sde.&& st_geometry operator
select * from sdedo.zus_technologie t
where ((t.shape && '400000000500000008001000E19304002800000000000000A9F0C09BCCFFFF0FB8F7DDB0AEFFFF0F8C86B9AA08000086D29FE10ACC86B9AA080000C6D29FE10A')='t')
but following simillar selection using just sde.st_geo_overlap function worked fine
select * from sdedo.zus_technologie t
where (sde.st_geo_overlap(t.shape, '400000000500000008001000E19304002800000000000000A9F0C09BCCFFFF0FB8F7DDB0AEFFFF0F8C86B9AA08000086D29FE10ACC86B9AA080000C6D29FE10A')='t')
difference between sde.&& operator and function sde.st_geo_overlap is in additional calls of RESTRIC/JOIN functions that are used to calculate selectivity for postgresql optimizer for && operator.
see operator definition:
CREATE OPERATOR sde.&& (
PROCEDURE = sde.st_geo_overlap,
LEFTARG = sde.st_geometry,
RIGHTARG = sde.st_geometry,
COMMUTATOR = OPERATOR(sde.&&),
RESTRICT = sde.st_geom_gist_sel,
JOIN = sde.st_geom_gist_joinsel
);
The one that seemed to be problematic in our case was function sde.st_geom_gist_sel.
It is a function that references st_geo_gist_sel in st_geometry.so.
So I tried to do following test (please do not take it as a recommended solution):
I put 10.7.1 st_geometry.so in postgresql/lib directory (changed name to st_geometry_1071.so there was already 10.6.1 st_geometry.so) and
changed function sde.st_geom_gist_sel to reference same function but in new 10.7.1 library.
CREATE OR REPLACE FUNCTION sde.st_geom_gist_sel(internal, oid, internal, integer) RETURNS double precision
LANGUAGE c
AS 'st_geometry_1071', 'st_geo_gist_sel';
and problem was gone.
So I would say that our problem was solved in st_geometry.so of 10.7.1 (Maybe your problem was solved there too)
Regards