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 1kKj7L-0003AA-Mp for pgsql-general@arkaria.postgresql.org; Tue, 22 Sep 2020 14:18:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kKj7K-0001ri-MZ for pgsql-general@arkaria.postgresql.org; Tue, 22 Sep 2020 14:18:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKj7K-0001rb-Cx for pgsql-general@lists.postgresql.org; Tue, 22 Sep 2020 14:18:02 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kKj7I-00026o-4g for pgsql-general@lists.postgresql.org; Tue, 22 Sep 2020 14:18:02 +0000 Received: by mail-wr1-x443.google.com with SMTP id x14so17238020wrl.12 for ; Tue, 22 Sep 2020 07:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ocado.com; s=google; h=reply-to:subject:to:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=eOpuysPdBEtUgueLmAvbqxaF9AOJN+5b6cjFtyKM4kw=; b=Hdvihq3kjiQPOD8RjA+J5lTQR8j/CqMyH18I2kybKUnDyo9cuY3C6uU2hHhEluNyPN W7383HXG35jFqbl8c8X1/eC/akgjFiaoW5/mzKgCJXYe5W/gY/yaeBFMzSBetnGCWFJE CJdU459ky4VbhW3BXowt/fOs531lN6/9LCWg5hrEtAYUdEEyykos2qbxVVokRX3eVSQH rQEmIxaywhEIvoNT3U/tYYzB9YA0rqso3PsitaiYzm5ddlq0kjac7LRIkRXNqUDepciZ us7sOH9uCxKMZ8TEOeziEIccRkP1WA2/mb+M3eQkhLlEqDFoG8xrvSTs7aqt0Od42uyH ReSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=eOpuysPdBEtUgueLmAvbqxaF9AOJN+5b6cjFtyKM4kw=; b=V9Gy4BO7d63BqAhZPQJfdbyfjbQGH/0SZ8x5MfsX0S7J+2+b/CuRdwhRqfbDo59qTB stJGLJzBIm2uLr8LdJbrr1Opa6I66Ne5jXDFZIxdcT8B0PeyXWHK55GtKwT7hwqS565l 0wMAmm9JEwXTC5Sfmh1oG6a/0Q6f2GyIVJvbRoVb8RhMEikOb5ft810EfgL/2yEpFOKx t3JwXt7HrvnRHoAndiVWMnysAudQNNoLObohCyXCrDXcTzZAb8nbvbt7qGjXCoQA4JX6 lPop15wRQiRTTQemGjUy6W+Gpi8UX1mlOBtu4CH9XT21cBoRUsPNNVyGdjv1Caur5OFZ imXQ== X-Gm-Message-State: AOAM531h0szrOJdbMZ2bze5MCVsEYpTVolIe4j0FPALQJQCZrka0KUSs eCoB/JhVU32h7AUOIoQUkTMaykethTVOlEkFIXa/sEbDyjW4+HcuiDqgbPWmGHyKdtpc004ywm8 Stn53d2ootM2kGqLWfub+Hs7feoiIDGsxFkpeQ81y/beh+UMsp5qghGBLgvD0Xo0rgry0cxqZXa Dy5L43km2BFrSuYRHwdA== X-Google-Smtp-Source: ABdhPJyewA105qFJ420X0KVA0QumTLh9i0k1ALBzxdYmhzVd4F9Sj3I6B90i+zor7UpnxA4lW7s0rw== X-Received: by 2002:adf:c44d:: with SMTP id a13mr5639546wrg.11.1600784276085; Tue, 22 Sep 2020 07:17:56 -0700 (PDT) Received: from ?IPv6:2a00:23c5:ba01:4200:4685:ff:fea4:b217? ([2a00:23c5:ba01:4200:4685:ff:fea4:b217]) by smtp.gmail.com with ESMTPSA id b18sm28095381wrn.21.2020.09.22.07.17.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Sep 2020 07:17:55 -0700 (PDT) Reply-To: f.venchiarutti@ocado.com Subject: Re: Can I get some PostgreSQL developer feedback on these five general issues I have with PostgreSQL and its ecosystem? To: pgsql-general@lists.postgresql.org References: From: Fabio Ugo Venchiarutti Organization: Ocado Technology Message-ID: <08af7113-b6b2-3bf1-b783-ececb94fc7f2@ocado.com> Date: Tue, 22 Sep 2020 14:17:54 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 21/09/2020 17:53, Joshua Drake wrote: > 3. The ability to embed PG to run in an automatic, quiet manner as part > of something else. I know about SQLite, but it's extremely limited to > the point of being virtually useless IMO, which is why I cannot use that > for anything nontrivial. I want my familiar PostgreSQL, only not require > it to be manually and separately installed on the machine where it is to > run as part of some "application". If I could just "embed" it, this > would allow me to create a single EXE which I can simply put on a > different machine to run my entire "system" which otherwise takes *tons* > of tedious, error-prone manual labor to install, set up and maintain. Of > course, this is probably much easier said than done, but I don't > understand why PG's architecture necessarily dictates that PG must be a > stand-alone, separate thing. Or rather, why some "glue" cannot enable it > to be used just like SQLite from a *practical* perspective, even if it > still is a "server-client model" underneath the hood. (Which doesn't > matter at all to me, nor should it matter to anyone else.) It depends what you mean by "embedded". If you want sqlite's linked library approach, where the database calls literally run your process' address space, then that's a no go, as postgres is a multi-user database server with its own process hierarchy. However, postgres also is a rather agnostic command that does not detach from the parent's terminal/stdio unless instructed to, so nothing stops your bespoke application from launching and managing its own postmaster as a directly managed child process - started as part of application initialisation - and having that listen on a local socket only available to the application itself; this is what we implemented in some of our installations where postgres is enslaved to the cluster control system - the configuration is re-generated at every restart (IIRC Patroni does something similar minus the unix socket part). A plethora of systems are built around the notion of programs calling other programs and managing the process' life cycle. The limiting factor to such architecture tends to be the OS's process control semantics and API (notoriously weaker or more contrived on non-unix-like OSs), but that's not postgres' fault. -- Regards Fabio Ugo Venchiarutti OSPCFC Network Engineering Dpt. Ocado Technology -- Notice: This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses. References to the "Ocado Group" are to Ocado Group plc (registered in England and Wales with number 7098618) and its subsidiary undertakings (as that expression is defined in the Companies Act 2006) from time to time. The registered office of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.