QGIS 3.40.4 on a Fedora Linux machine. Only while layer is filtered and trying to upload it from postgres does this error come up. Removing the filter uploads no problem. Extracting the data to a scratch layer, and then filter it, uploads no problem.

QGIS 3.40.4 on a Fedora Linux machine. Only while layer is filtered and trying to upload it from postgres does this error come up. Removing the filter uploads no problem. Extracting the data to a scratch layer, and then filter it, uploads no problem.