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 1jhBmU-0003eC-RI for pgsql-general@arkaria.postgresql.org; Fri, 05 Jun 2020 12:49:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jhBmT-00012a-OO for pgsql-general@arkaria.postgresql.org; Fri, 05 Jun 2020 12:49:05 +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 1jhBmT-00012T-G6 for pgsql-general@lists.postgresql.org; Fri, 05 Jun 2020 12:49:05 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jhBmR-00047l-0d for pgsql-general@lists.postgresql.org; Fri, 05 Jun 2020 12:49:04 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.15.2/8.15.2/Debian-8) with ESMTPS id 055CmtLg019710 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 5 Jun 2020 15:49:00 +0300 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id 055CmtYc032788 for ; Fri, 5 Jun 2020 15:48:55 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: Oracle vs. PostgreSQL - a comment To: pgsql-general@lists.postgresql.org References: <0959C81A-5B07-4D04-A6B1-57AA78A9A553@gmail.com> <20200601095835.GA1996@hjp.at> <974ab21a-013c-8dbc-18f5-575f1e356647@postgrespro.ru> <20200602183038.GY6680@tamriel.snowman.net> From: Achilleas Mantzios Message-ID: Date: Fri, 5 Jun 2020 15:48:55 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.101.4 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-29.0 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/6/20 3:33 μ.μ., Ravi Krishna wrote: >>> Plus PG does not directly support cross database queries using 3 part name, something >>> sqlserver excels at. >> Maybe because SQL server does not have real databases but schemas instead ? >> This sucks security wise. > SQLServer has real databases with its own transaction log files. You can restore individual databases in a cluster. > They also have schemas which are not same as users (Oracle treats users and schemas same). Ok, I never meant SQL Server does not have real databases, I meant it handles databases as top level schemas. > > For security, there is grant connect to the DB and further filtering based on schema. PostgreSQL has stronger protection at connection level, via pg_hba.conf . PostgreSQL also supports db-level GRANTs . In MS SQL server if you need an additional DB for maintenance tasks or to act as an intermediate bridge (like in our case) with write access on it, then automatically you write access to the main schema (ok DB in MS SQL terms). (and need further REVOKES to fix security). This (security-wise) is just poor. So the cross db joins come with a price. > > I find SQLServer implementation pretty strong in this. > > The only time this can be a problem is when few databases failover in a mirrored environment (streaming replication in PG speak). > Then suddenly 3 part names would fail if the remote DB is no longer primary. My experience with SQLServer is badly dated. Last > time I worked was SS2008. I believe in later versions they solved this problem by the failover group concept which failovers all > inter-related databases at one go. > > BTW Mysql treats databases and schemas as same (that's what it was few years ago) > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt