Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g24DH-0000IH-7W for pgsql-admin@arkaria.postgresql.org; Tue, 18 Sep 2018 00:49:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g24DF-0006PH-L5 for pgsql-admin@arkaria.postgresql.org; Tue, 18 Sep 2018 00:49:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g24DF-0006P9-DX for pgsql-admin@lists.postgresql.org; Tue, 18 Sep 2018 00:49:57 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([202.78.240.226]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g24D6-0007kw-7v for pgsql-admin@lists.postgresql.org; Tue, 18 Sep 2018 00:49:56 +0000 Received: from [IPv6:2404:130:0:1000:222:4dff:fe88:a586] (unknown [IPv6:2404:130:0:1000:222:4dff:fe88:a586]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 757B380CB4; Tue, 18 Sep 2018 12:49:41 +1200 (NZST) Subject: Re: sqlite_fdw crashes & errors To: Mariel Cherkassky , pgsql-admin@lists.postgresql.org References: From: Mark Kirkwood Openpgp: preference=signencrypt Autocrypt: addr=mark.kirkwood@catalyst.net.nz; prefer-encrypt=mutual; keydata= xsDiBEifoLIRBADnzz1YAQxN+ajn3XhoyTWmp4hHTE05y1Ai0Hf4Et6HYohOw14eFzpzgEpd nbtxbs/FDprNC1d2dJ+J67qLzwKW6k95xekMWVtBQJ+tm7W9GPQ/wSSeOiya2t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2D0p/lvd3/QxtVGWts73y IAhRhWvq4jCC6Oy7IDrjRbnO0GEpumiMiT2kko1MCpXwBuJlKUxjlmlwEsKv2fbIsuGlES1u /QrLAk1ePfh5VDyKM5z+WT3GMDolrabehI8q5f0ZWPmN63Me6IM6Oqf5kYuRH0gwAauO3/bF 6NjNsQvM6lm0MbcOzSBNdH/Aru6QPbhscArMUx2opn7gkYg8wCN+Bd1Se1dQTtAcDrEBmR5i aoCbEZYkCqVAJF/C5j7CSQQYEQIACQUCSJ+guQIbDAAKCRCn/vj7UjxSJn5/AJ4hzPttJ18v gOljiFMBvwIk2HIMTQCfYMk+dS/ixjmPGZ55dk9MNuaLSYQ= Message-ID: <534fa6d9-4541-bb7d-a26c-3c021690cc4b@catalyst.net.nz> Date: Tue, 18 Sep 2018 12:49:41 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-GB List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 17/09/18 00:01, Mariel Cherkassky wrote: > Hi, > I installed sqlite_fdw(https://github.com/pgspider/sqlite_fdw) on my > postgresql v9.6. > As mentioned on the github page, the extension supports writes.=C2=A0 > > However, When I try to insert record into my foreign table my > postgresql crushes :=C2=A0 > > sqlite> .schema MARIEL_TEST > CREATE TABLE MARIEL_TEST( cola INTEGER PRIMARY KEY, colb TEXT, colc > INTEGER); > > db=3D# CREATE FOREIGN TABLE MARIEL_TEST_foreign(cola integer, > colbtext,colc integer) SERVER sqlite_server OPTIONS (table 'MARIEL_TEST= '); > CREATE FOREIGN TABLE > afa=3D# insert into MARIEL_TEST_foreign values(1,1,1); > server closed the connection unexpectedly > =C2=A0 =C2=A0 =C2=A0 =C2=A0 This probably means the server terminated a= bnormally > =C2=A0 =C2=A0 =C2=A0 =C2=A0 before or while processing the request. > The connection to the server was lost. Attempting reset: Failed. > !> > !> .exit > -> ; Just tried this (Postgres 9.6.10 src build and sqlite_fdw on Ubuntu 18.04). Works for me. Hmmm interesting. I did one thing different from you - my sqlite db is under Postgres home dir (/home/postgres/sqlite). Thinking for a bit ... did you create the sqlite db as the postgres user or someone else? If the latter then that might explain the crash (e.g permission denied). Cheers Mark