cannot have more than 2^32-1 subtransactions in a transaction
I'm trying to run this but after 10 hours I get the error "cannot have more than 2^32-1 subtransactions in a transaction"
I'm using postgresql 11
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(ST_MakeValid(ST_SnapToGrid(b.geom, 0.0001)))
FROM test600 b
WHERE safe_isect(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
I'm using this function:
CREATE OR REPLACE FUNCTION safe_isect(geom_a geometry, geom_b geometry)
RETURNS boolean AS
$$
BEGIN
RETURN ST_Intersects(geom_a, geom_b);
EXCEPTION
WHEN OTHERS THEN
BEGIN
RETURN ST_Intersects(ST_Buffer(geom_a, 0.0000001), ST_Buffer(geom_b, 0.0000001));
EXCEPTION
WHEN OTHERS THEN
RETURN ST_GeomFromText('POLYGON EMPTY');
END;
END
$$
LANGUAGE 'plpgsql' STABLE STRICT;
Previously when I ran the following command I was able to get to 30 hours of runtime but I had an error with one of the geometries which caused it to stop and is why I modified the ST_Difference part above
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(b.geom, 0.0001)
FROM test600 b
WHERE st_intersects(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
errors postgis postgresql-11
New contributor
add a comment |
I'm trying to run this but after 10 hours I get the error "cannot have more than 2^32-1 subtransactions in a transaction"
I'm using postgresql 11
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(ST_MakeValid(ST_SnapToGrid(b.geom, 0.0001)))
FROM test600 b
WHERE safe_isect(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
I'm using this function:
CREATE OR REPLACE FUNCTION safe_isect(geom_a geometry, geom_b geometry)
RETURNS boolean AS
$$
BEGIN
RETURN ST_Intersects(geom_a, geom_b);
EXCEPTION
WHEN OTHERS THEN
BEGIN
RETURN ST_Intersects(ST_Buffer(geom_a, 0.0000001), ST_Buffer(geom_b, 0.0000001));
EXCEPTION
WHEN OTHERS THEN
RETURN ST_GeomFromText('POLYGON EMPTY');
END;
END
$$
LANGUAGE 'plpgsql' STABLE STRICT;
Previously when I ran the following command I was able to get to 30 hours of runtime but I had an error with one of the geometries which caused it to stop and is why I modified the ST_Difference part above
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(b.geom, 0.0001)
FROM test600 b
WHERE st_intersects(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
errors postgis postgresql-11
New contributor
add a comment |
I'm trying to run this but after 10 hours I get the error "cannot have more than 2^32-1 subtransactions in a transaction"
I'm using postgresql 11
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(ST_MakeValid(ST_SnapToGrid(b.geom, 0.0001)))
FROM test600 b
WHERE safe_isect(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
I'm using this function:
CREATE OR REPLACE FUNCTION safe_isect(geom_a geometry, geom_b geometry)
RETURNS boolean AS
$$
BEGIN
RETURN ST_Intersects(geom_a, geom_b);
EXCEPTION
WHEN OTHERS THEN
BEGIN
RETURN ST_Intersects(ST_Buffer(geom_a, 0.0000001), ST_Buffer(geom_b, 0.0000001));
EXCEPTION
WHEN OTHERS THEN
RETURN ST_GeomFromText('POLYGON EMPTY');
END;
END
$$
LANGUAGE 'plpgsql' STABLE STRICT;
Previously when I ran the following command I was able to get to 30 hours of runtime but I had an error with one of the geometries which caused it to stop and is why I modified the ST_Difference part above
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(b.geom, 0.0001)
FROM test600 b
WHERE st_intersects(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
errors postgis postgresql-11
New contributor
I'm trying to run this but after 10 hours I get the error "cannot have more than 2^32-1 subtransactions in a transaction"
I'm using postgresql 11
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(ST_MakeValid(ST_SnapToGrid(b.geom, 0.0001)))
FROM test600 b
WHERE safe_isect(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
I'm using this function:
CREATE OR REPLACE FUNCTION safe_isect(geom_a geometry, geom_b geometry)
RETURNS boolean AS
$$
BEGIN
RETURN ST_Intersects(geom_a, geom_b);
EXCEPTION
WHEN OTHERS THEN
BEGIN
RETURN ST_Intersects(ST_Buffer(geom_a, 0.0000001), ST_Buffer(geom_b, 0.0000001));
EXCEPTION
WHEN OTHERS THEN
RETURN ST_GeomFromText('POLYGON EMPTY');
END;
END
$$
LANGUAGE 'plpgsql' STABLE STRICT;
Previously when I ran the following command I was able to get to 30 hours of runtime but I had an error with one of the geometries which caused it to stop and is why I modified the ST_Difference part above
CREATE TABLE cities_union AS SELECT k, COALESCE(ST_Difference(geom, (SELECT st_union(b.geom, 0.0001)
FROM test600 b
WHERE st_intersects(a.geom, b.geom)
and a.area > 0
and b.area > 0
AND a.area > b.area
and wof_id is not null
)
),
a.geom)
FROM test600 a
where a.area > 0
;
errors postgis postgresql-11
errors postgis postgresql-11
New contributor
New contributor
New contributor
asked 4 mins ago
jakscojaksco
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
jaksco is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f233453%2fcannot-have-more-than-232-1-subtransactions-in-a-transaction%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
jaksco is a new contributor. Be nice, and check out our Code of Conduct.
jaksco is a new contributor. Be nice, and check out our Code of Conduct.
jaksco is a new contributor. Be nice, and check out our Code of Conduct.
jaksco is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f233453%2fcannot-have-more-than-232-1-subtransactions-in-a-transaction%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown