Skip to content

Commit ece9116

Browse files
authored
Merge pull request #8152 from liranmauda/liran-backport-into-5_15
[Backport into 5.15] fix for list_objects
2 parents 1c8533f + fbd4d3c commit ece9116

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server/object_services/object_server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,9 @@ function _list_add_results(state, results) {
12121212
// this case avoids another last query when we got less results and no common prefixes
12131213
// with common prefixes we cannot avoid the last query because the results might be
12141214
// less than the requested limit although there are more results to fetch
1215-
if (!has_common_prefixes && count >= state.user_limit) {
1215+
//
1216+
// for postgres we should not do another query, since the list command returns the required limit
1217+
if (config.DB_TYPE === 'postgres' || (!has_common_prefixes && count >= state.user_limit)) {
12161218
state.done = true;
12171219
}
12181220
}

0 commit comments

Comments
 (0)