Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j5BgH-0007sh-T3 for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2020 17:01:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j5BgG-0008Ke-Nt for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2020 17:01:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j5BgG-0008KX-AC for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2020 17:01:36 +0000 Received: from portal-smtp-out.hot.ee ([194.126.101.125]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j5BgC-00029K-MM for pgsql-general@postgresql.org; Fri, 21 Feb 2020 17:01:34 +0000 Received: from localhost (localhost [127.0.0.1]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id ED46C1DDF; Fri, 21 Feb 2020 19:01:29 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at vm-hot-relay10.estpak.ee Received: from portal-smtp-out.hot.ee ([127.0.0.1]) by localhost (vm-hot-relay10.estpak.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 49WWYeTUF2rd; Fri, 21 Feb 2020 19:01:27 +0200 (EET) Received: from mail.hot.ee (hot-relayhost3.estpak.ee [213.180.2.81]) by vm-hot-relay10.estpak.ee (Postfix) with ESMTP id 5E7AB1DDE; Fri, 21 Feb 2020 19:01:27 +0200 (EET) Received: from dell2 (66-63-196-88.sta.estpak.ee [88.196.63.66]) (Authenticated sender: kobruleht2) by HOT-Relayhost3.estpak.ee (Postfix) with ESMTPSA id 48PHmN6hF0z3VF; Fri, 21 Feb 2020 19:01:23 +0200 (EET) Message-ID: From: "Andrus" To: "Alvaro Herrera" , "Adrian Klaver" Cc: "pgsql-general" References: <20200220224220.GA25223@alvherre.pgsql> <21459e71-77c1-c3d0-a3e4-e2b97fd1efc3@aklaver.com> In-Reply-To: <21459e71-77c1-c3d0-a3e4-e2b97fd1efc3@aklaver.com> Subject: Re: How to fix 0xC0000005 exception in Postgres 9.0 Date: Fri, 21 Feb 2020 19:01:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 16.4.3528.331 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi! >Realized I should have been clearer. By pre-libpq I meant this: >https://odbc.postgresql.org/docs/release.html >psqlODBC 09.05.0100 Release >Changes: > Use libpq for all communication with the server > Previously, libpq was only used for authentication. Using it for all > communication lets us remove a lot of duplicated code. libpq is now > required for building or using libpq. I upgraded psqlodbc driver to 12.1 version but problem persists. After server is manually started, application works. I added log_statement = 'all' . Log before crash is: 2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: SELECT drop_table('temptulemus') 2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: create temp table temptulemus as SELECT * FROM andmetp ;select * from temptulemus limit 0 2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: select n.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind, c.oid, pg_get_expr(d.adbin, d.adrelid), case t.typtype when 'd' then t.typbasetype else 0 end, t.typtypmod, c.relhasoids, '', c.relhassubclass from (((pg_catalog.pg_class c inner join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid = 28203181) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname, attnum 2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: select COUNT(*)::int from temptulemus 2020-02-21 18:46:40 EET mydbadmin mydb LOG: statement: ;SELECT * FROM temptulemus offset 0 limit 900 2020-02-21 18:46:40 EET LOG: server process (PID 6000) was terminated by exception 0xC0000005 2020-02-21 18:46:40 EET HINT: See C include file "ntstatus.h" for a description of the hexadecimal value. 2020-02-21 18:46:40 EET LOG: terminating any other active server processes So command which causes crash is SELECT * FROM temptulemus offset 0 limit 900 As shown in lines before this is data from andmetp table. This table contains text type column. This column may contain data like