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 1nEOxY-0004n2-V6 for pgsql-general@arkaria.postgresql.org; Mon, 31 Jan 2022 05:10:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nEOxW-0001sR-T1 for pgsql-general@arkaria.postgresql.org; Mon, 31 Jan 2022 05:10:34 +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 1nEOxW-0001sH-Eb for pgsql-general@lists.postgresql.org; Mon, 31 Jan 2022 05:10:34 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nEOxT-0001Tq-JB for pgsql-general@lists.postgresql.org; Mon, 31 Jan 2022 05:10:33 +0000 Received: by mail-ej1-x62a.google.com with SMTP id s5so39080915ejx.2 for ; Sun, 30 Jan 2022 21:10:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=yQcD1AbvVDDWZ73uTbbVatYceE8z6pI5SsvCca8+kek=; b=5hhLb75BgNlmHi1bHUKjHWbURFAMHvJvekUlIUx4++PsCSr3qKYA3k+PiC2PgvhveD NQZaiuhnMvzgBhGJ8JYYgkqPbNOYjHLU6lrjskzgCrRL1ManJ51z0+k7f4jekVlsNsYc tBtuRTbYSXNkqgX5p4YPSppfuCqN3LO0Lx132lH8U/zmSJngTGSq9/Jzrw4iq0yb2rIY JnlLoBKpQd7Zn0Mmsm7/R/n99dKumLZPBW5n7MxVKXDw7aPIGBDaToNAODxpyn4kNYLY HWOvXLDjHMz1nLMO4O5zk0GV21ZSxswkdOX7S1lx0xHCs60yVc+GtkAacR7fYXCVsi9B Gjnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=yQcD1AbvVDDWZ73uTbbVatYceE8z6pI5SsvCca8+kek=; b=Cf/ZybdeFZ+BwI4SfcrfA43lkhP6GTqFIOXizl8D/Hm8MzvIf38SLjOLTTsku5+yeW seOFE4wI/w5//RtHyGLrHsPjwwpTjNILXrPvT+Z0ZR9ya38opL212MGkq7+JyuTw/U5V LRxNBnnlX/Un1CvouPsF5tGqKLxk0b2ayk4QmK1rBUC6sVn/euaDL+/DwtqdaTqEvmSc KSTvewAKeOeW+MrIGBZkwKMpnVf87BZ52hesikFm9GLeyH7bzcbhmzAdULY/0NK6884l H7wCoqE0HndlJlJ888drKvHczGaNttF3GMljuwG25GRtNqvAsXkbU7f8JSyEi10gcjBO 89UQ== X-Gm-Message-State: AOAM530i4+MjSz4qPgJp2OCV4Bi3A680Veya833+7zoGT+aS6griKmbH O72yLEk32Eq7kVd2oaDtqySGYELq5ScSYA== X-Google-Smtp-Source: ABdhPJwiGap/vTlc3iEY7Y+wF0vzqpjErZbCxPuz4onznnhoCerSnTKAtZJdDHWwgirSNQK1p2sYew== X-Received: by 2002:a17:907:a088:: with SMTP id hu8mr15042722ejc.439.1643605829107; Sun, 30 Jan 2022 21:10:29 -0800 (PST) Received: from localhost.localdomain (91-115-144-182.adsl.highway.telekom.at. [91.115.144.182]) by smtp.gmail.com with ESMTPSA id v8sm12819408eju.57.2022.01.30.21.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jan 2022 21:10:28 -0800 (PST) Message-ID: Subject: Re: what is the solution like oracle DB's datafile From: Laurenz Albe To: Yudianto Prasetyo , pgsql-general@lists.postgresql.org Date: Mon, 31 Jan 2022 06:10:27 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-2.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2022-01-30 at 05:15 +0700, Yudianto Prasetyo wrote: > I want to ask why postgresql doesn't create a datafile like it has oracle? > > I'm confused when I have 2 HDD. HDD 1 is used to install the OS and postgresql database. > when HDD 1 is full. how to increase the capacity of postgresql database with HDD 2 (without RAID system)? > > is there any other way like oracle DB's "add datafile" which can be used to add capacity to another HDD? The difference between Oracle and PostgreSQL here is that Oracle implemented its own file system and volume manager, while PostgreSQL uses the facilities provided by the operating system. The correspondence is not perfect, but you can compare an Oracle tablespace to a logical volume with a file system and a datafile to a physical volume. So to get the same thing in PostgreSQL, you have to interact with the operating system: add a new physical volume to the logical volume where your database resides and extend the file system. To answer the question "why", here are two points: - PostgreSQL does not have the (wo)manpower to re-invent the wheel on everything, so we tend to use existing facilities - Oracle was developed earlier, and one can argue that in those days file systems were not so great, so there was more need to write your own Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com