Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdkCX-00070d-3w for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Apr 2014 17:46:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WdkCV-0007Ok-Om for pgsql-bugs@arkaria.postgresql.org; Fri, 25 Apr 2014 17:46:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdiR0-0004Eg-Nd for pgsql-bugs@postgresql.org; Fri, 25 Apr 2014 15:53:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WdiQx-0005Gv-42 for pgsql-bugs@postgresql.org; Fri, 25 Apr 2014 15:53:06 +0000 MIME-Version: 1.0 Subject: BUG #10141: Server fails to send query result. To: pgsql-bugs@postgresql.org From: molind@gmail.com Date: Fri, 25 Apr 2014 15:52:27 +0000 Message-ID: <20140425155227.2715.56833@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 10141 Logged by: Evgen Bodunov Email address: molind@gmail.com PostgreSQL version: 9.3.4 Operating system: Ubuntu 13.10 Description: I have big database with geospatial data from OpenStreetMap. I prepare vector tiles from this data using console app which requests data from database for each tile in given area. While it works it opens 1 db connection per thread (8 threads) and queries all tiles from list 25k tiles in average. 5 queries per tile. During map generation usually 2 threads stuck in idle state. http://i.stack.imgur.com/VUU4O.png Look at the last row. Query started. We have a timestamp, then it finished and changed state to idle, and we have timestamp of that moment. Everything looks ok, except console app which waits answer from server inside PGresult *res = PQexec(conn, query); It waits for query results from server. And I can't find why server thinks that job is done and app says that there was no answer from db yet. I added PQtrace for each thread and wait for stuck thread. There is trace: From backend> D From backend (#4)> 139891 From backend> D From backend (#4)> 139891 From backend> D From backend (#4)> 139891 From backend> D From backend (#4)> 139891 From backend> D From backend (#4)> 139891 From backend> D From backend (#4)> 139891 Seems problem somewhere inside PostgreSQL. It tries to send result but fails. PostgreSQL 9.3.4-1.pgdg70+1 installed from apt source deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs