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 1j5Ep0-0008P5-BU for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2020 20:22:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j5Eoz-0003yl-4N for pgsql-general@arkaria.postgresql.org; Fri, 21 Feb 2020 20:22:49 +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 1j5Eox-0003wl-RE for pgsql-general@lists.postgresql.org; Fri, 21 Feb 2020 20:22:48 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j5Eou-0003k3-NP for pgsql-general@postgresql.org; Fri, 21 Feb 2020 20:22:46 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1B6FB21E95; Fri, 21 Feb 2020 15:22:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 21 Feb 2020 15:22:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=7 X1531Rq+WJ9eJTd83uOHK/YP2guC5wXHOLikBekqCc=; b=n2BKbo/rfL6GY/x7O G4/kgveLv0HEODeIPmUvqbztpOJ2mCKRP1V9OyrtaN5tmOziWJxzgyO8uBqRAITn C9kWDUfikcOo+6PAkkY2SVw0wK87+uORZR9KLi5mTsKnARGPqEyT47n0/Wk1oAEB drHURJ87Y4GUDYngppGuao6j5FwUTnGgk8EKedxvp50OY8oZS1h9+yP+fm8pFVqC KyUOIBVtydud6FJYQZm+5xfEcVQ4W9hITC4u3VszhRt2wIwolhUr6caCQEh4vrBd M9FXX18/b6aaokgbz/WkNawlu8cq9vSP5uJGIkhbwkKLw47misW7KeD+erD0BVtJ rqg1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=7X1531Rq+WJ9eJTd83uOHK/YP2guC5wXHOLikBekq Cc=; b=r2iZuiCz/MmRhG81EwwAucWYHrLXsVCE8CLqaVYJDYsSPfE6DxV8QiPJP s6tlWDVSVbWPZS9xnmNeHaMcVNKqKvi7sKVVG9/rHhUjfupYNj7VQ80XxlaQxJ9m kb1Uz9+E3DKdUBL50RnSSmuILjEOtcOGBSLA6AVq2furcAtE8+fL7gf4NbjF0DaM pA4jvniOIo40YzM1w+n8jImMYauMqBB/xQaafYITMScrazdetIt6BdzZFk+q+jl8 zlssdKeBhH67KTAP0pYzD8Tq1bZsYVSkkCeCCLiLiL4i/WDYZKu7sGPPQ4FS6x0u Q7nue40JevrGM6j2WCwTIszMZG9xA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrkeeggddufeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvddu vddruddvledrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id DEBEC3060FCB; Fri, 21 Feb 2020 15:22:41 -0500 (EST) Subject: Re: How to fix 0xC0000005 exception in Postgres 9.0 To: Andrus , Justin Cc: Alvaro Herrera , pgsql-general References: <20200220224220.GA25223@alvherre.pgsql> <21459e71-77c1-c3d0-a3e4-e2b97fd1efc3@aklaver.com> <8544B731C26E4A0D82BCC0DA5391735F@dell2> From: Adrian Klaver Message-ID: Date: Fri, 21 Feb 2020 12:22:40 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <8544B731C26E4A0D82BCC0DA5391735F@dell2> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/21/20 10:24 AM, Andrus wrote: > Hi! > >> forgot to say publish the Linux logs it may have more details what is >> going on > > Linux server has older application client which replicates all data one > from andmetp table using select * from andmetp > I tried several times. Linux log contains > > 2020-02-21 16:18:50 EET mydbadmin mydb STATEMENT:  SELECT * FROM andmetp > 2020-02-21 16:18:50 EET mydbadmin mydb FATAL:  connection to client lost > 2020-02-21 16:18:50 EET mydbadmin mydb STATEMENT:  SELECT * FROM andmetp > 2020-02-21 17:19:08 EET mydbadmin mydb LOG:  could not send data to > client: Connection reset by peer > 2020-02-21 17:19:08 EET mydbadmin mydb STATEMENT:  SELECT * FROM andmetp > 2020-02-21 17:19:08 EET mydbadmin mydb FATAL:  connection to client lost > 2020-02-21 17:19:08 EET mydbadmin mydb STATEMENT:  SELECT * FROM andmetp > > It looks like only connection was terminated.  “dmesg -T” does not show > postgres crash. Maybe postgres main process is not killed in Linux. > >> is this happening from any client or just a specific client running ODBC? > > This happene if Windows 2008 server if logged in same same server from > RDP client and in my development windows 10 workstation which logs to > linux server over VPN > >> are the clients running AV if so are the AV versions the same? > > In windows 2008 server antivirus was turned off like I wrote.  In my > devel workstation I use Microsoft antivirus coming with windows 10. > >> Given this is killing a Linux server,  sounds like ODBC is sending >> back garabage data to the server crashing it. > > I can try publish odbc log if this helps. > > Application replicateds some tables at startup to local disk. > For tables with 5000 or more rows odbc connection hangs if there is big > TCP packet loss. > So we changed  replication command > > select * from mytable > > to commands > > select drop_table(‘temptulemus’); > create temp table  tempestuous as select * from mytable; > > select * from mytable offset 0 limit 900; > select * from mytable offset 900 limit 900; > select * from mytable offset 1800 limit 900; > ... > > etc. > > In this case data was also retrieved on poor connections. > Maybe there is some better solution for this. > >> There are several settings in OBDC, to change how text columns are >> processed, play around with those settings see if that helps it >> https://odbc.postgresql.org/docs/config.html > > Application needs certain settings. Maybe it is better try to upgrade to > Postgres 12.2 first. > >> As you have it narrowed down to a table,  try querying only a few >> records at a time to see if you can identify the specific Record(s) >> that may be the issue. >> SELECT * FROM temptulemus where temptulemus.unique_id >1  offset 0 >> limit 100 >> and try querying the columns that do not contain the suspect data that >> could be causing this > > andmetp table contains 584 record in linux server. I tried script to > read data from this table every time one more row In psql what does \d tempestuous show? What relation is andmetp to tempestuous? I thought you said you had problem with same table in Linux and Windows servers? From above what does the drop_table() function do in?: select drop_table(‘temptulemus’); > > for i=1 to 600 > ? i > StartTextMerge() > TEXT TEXTMERGE NOSHOW > select * from andmetp limit <> > ENDTEXT > IF !TExec() >  RETURN .f. >  ENDIF > endfor > > this worked without error. > > Andrus. -- Adrian Klaver adrian.klaver@aklaver.com