Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l07Sb-0003ze-Sw for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Jan 2021 18:35:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l07SX-0004V4-Vl for pgsql-bugs@arkaria.postgresql.org; Thu, 14 Jan 2021 18:35:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l07SX-0004Ug-M8 for pgsql-bugs@lists.postgresql.org; Thu, 14 Jan 2021 18:35:01 +0000 Received: from lahtoruutu.iki.fi ([2a0b:5c81:1c1::37]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l07SU-0007ah-5t for pgsql-bugs@postgresql.org; Thu, 14 Jan 2021 18:35:00 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54faa4-119.dhcp.inet.fi [84.250.164.119]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 62E6E1B00162; Thu, 14 Jan 2021 20:34:52 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1610649292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yNxQuLg0iMVVf+Yhdcblyot8lSdJr4VZejwHbbSj6Ws=; b=S6/EJ+pUaXUuiJmJwo926yWcwb7KFpWJkFzZMRKh9rE3OZQNqLfzcgRXKvKZQpyh7UUbLX TNmOXV7CmpY7Ylt2PXuxHuDxkpQlm3+bqPit816hfoGVtbB8lCA7L5mnXtgrew78BYrXvo UAuuoV3lpRnL0ixmp4++aDmTFH0n49/LbOGHAQtYZwno0NGeCQchxlu03ws1ImjD27WtYr KONO8ncBk1RpPdXoDJTnArZ++SYfoBYnL/RWuUBbzVvTpNMVTC/pXluYdDJDLW520gu2PS /9yK/zKTbAM5nIGsgVzDhGGPRH+JzMueteDTPcMd3mEmvbmhnEeDmfurwplrMA== Subject: Re: questions about porting postgresql to older operating system To: Tom Lane , Tim Kelly Cc: pgsql-bugs@postgresql.org References: <600073D8.8010604@dialectronics.com> <1418718.1610648323@sss.pgh.pa.us> From: Heikki Linnakangas Message-ID: Date: Thu, 14 Jan 2021 20:34:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <1418718.1610648323@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1610649292; a=rsa-sha256; cv=none; b=uzLbaWRnejNE/ms8Wb0hd8ECxkL+mUwf40f6EpeeQMtkDszcjbU3VbHSfvMl/qkWj0JCOw zGZ3rt5sjBFpS7I8jue1G9QQZJtP5oGks6FJXuB/lfJkNyYDmo6D0LNMQ76JE8Vo3co7s9 1nShSeeYPr2tScgN4lt3sN9XCLphyHDbRPtmWaTf1SDHBv42vJKDccn67aXCDShPfdCXno 6WeUQE/nKyVFEV/JnUSctW6ZLWjUhCni2C8YhdEamXBeHFZhT5LVBOQgqKU9wwZ2XI8ZSM cxhOM6cUPlsJiJldK1VF8Hob56xiXhHFKeYTbPxcPdAN+oNWMP93rW1PMq11zQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1610649292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yNxQuLg0iMVVf+Yhdcblyot8lSdJr4VZejwHbbSj6Ws=; b=vzpsX3NJoac+hZq8MoM7MmkLxr4Pg8UKLb1wYAg0q/UOhzKt2kZ5fingdxWHxN0HnE43S/ 0iYZAmvsBxaWhuc/9SyAr83f/0i1gxdRr8eGbmwIhHckXnKE3tRXlVYN7lz6mqqorHGe2N f0nLVY7ftOTklHnxVvxcIMtFlUbltmcArXhTa0W9nq4P6FIE948F/5wVhL5Vqwj/MMenfs r1XIdXifztj/1IgYyW/Q1N3OKH4iZDUPhiu87xwcAV/9MRapAOOIr45yJOMOvulajvXpfz u0pMJ8bgns0MrEmlQYKv7SyQr5hLtxonzAJI+cDDQobYqdF6v9Zn7epDzNQ5kg== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 14/01/2021 20:18, Tom Lane wrote: > Tim Kelly writes >> 3) Can postgresql still work without dynamic loading support? > > mmm ... in principle yes, but you'll lose one heck of a lot of > functionality that's implemented in extension modules. Possibly > that could be worked around by deciding which extensions you need > and statically binding them into the backend executable. Again, > that's not a case we've worried about for the last twenty years > or so, so there's likely to be some pain there. As it happens, I tried to build a completely static postgres binary yesterday. I was debugging the failure on sparc64, and I found out about user-space qemu, which can run binaries in binaries in a foreign architecture directly without a virtual machine. However, it requires that the binary is compiled statically. Cross-compiling a static postgres binary was surprisingly easy on Debian, but when I tried to run it, initdb failed because some library functions like getpweid() and gethostaddr() didn't work when linked statically. The cross-compiler warned about those, which was nice. I stubbed out a few of those library functions, but eventually it failed on a call to dlopen(). That's where I gave up. It would be cool if that worked. - Heikki