Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWDUE-002Uff-0d for pgsql-general@arkaria.postgresql.org; Wed, 16 Aug 2023 10:10:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qWDUC-005b28-NZ for pgsql-general@arkaria.postgresql.org; Wed, 16 Aug 2023 10:10:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qWDUC-005b20-CA for pgsql-general@lists.postgresql.org; Wed, 16 Aug 2023 10:10:44 +0000 Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qWDU9-000QPP-Eo for pgsql-general@lists.postgresql.org; Wed, 16 Aug 2023 10:10:43 +0000 Received: by mail-qk1-x72e.google.com with SMTP id af79cd13be357-76d70d181dfso13651285a.1 for ; Wed, 16 Aug 2023 03:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692180640; x=1692785440; h=content-language:subject:to:user-agent:mime-version:date:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=azI6Eq8GxeSUvq0lXSwhzV6XwQuqDlCOqOrVX/Bo2Lg=; b=PqnE+41yppv6UBW3tthfrXqtgovWFeTLPBUS+CaxtbwNSV3S3aqzrNewzi++Zb7CoK 0Uf38SM/uQM0gRdiUISjP9oK1f0zYn9VoBKM/ffUl7HXN0gQAZXqvLi38BFZ5iGDWh5M pGFDjACEUgxlGtJTXLSdnzewN4ojy6wkm5I48A5ksAZA9R+fT4ZRnvSIwsEIRvTy8HMQ a0FqaP7H2KVtY/2fD0kVNcAe29ZUyU0ab+Q7xtz9WxjKSjEQ3fK4OMdSm/RyvhdCRW1N HMj9iVRON11LP2FaGublVblDS13PC3h58cDBiqfcnYsk5C2v5t4xNFZMI1aG4yWJtrSS JSlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692180640; x=1692785440; h=content-language:subject:to:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=azI6Eq8GxeSUvq0lXSwhzV6XwQuqDlCOqOrVX/Bo2Lg=; b=eVvY0ultphub/4TxzEpq0vBMZ4dC3jLvpzMDfG5/UzxzsBq7CUU21TrsYidDg6W3Ue ZLr7kIibPfuzqK9bch8EIWEEuh2GJuX9rrzG/ugcc+eIXAteBhYThm4i08EPtF5qXsoI cOVilik7jB9DMArbkFcireX1/KX7iamgNAd9JpB54IOERcTng7XaSPqRivMQFFMNBbU1 zwnu8k1M35f4iyCIj1Zx9TnpuXHbpRNAnD9j54GftGcF2Pw10bfV1LmLKr1OdpzVxsdw 2qCkqEGvo43y/XG1bMi2oE5rNE073+ZPjpafafAHKpHY/JnHrr9VQyCF1ZrRsjQkHaWk ML1Q== X-Gm-Message-State: AOJu0Yw++mPmosinHVbSjPdF3kJBAFCEEDPHUItR5+YmfFVmaLC0zocC gRyN00GShZY2nfUiYPUUhx+9I4sIDQs= X-Google-Smtp-Source: AGHT+IEXj9KtjTlfptE+ygo+3kelWSUU7wXooYF4McvdQOmzWmY3HWLRRfyAy/fZFpnNZeRscNTSKQ== X-Received: by 2002:a05:620a:40c7:b0:767:e994:ff03 with SMTP id g7-20020a05620a40c700b00767e994ff03mr1593883qko.15.1692180639794; Wed, 16 Aug 2023 03:10:39 -0700 (PDT) Received: from [192.168.2.170] ([67.70.150.114]) by smtp.gmail.com with ESMTPSA id d11-20020a05620a166b00b00767d00d10e9sm4299065qko.58.2023.08.16.03.10.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 16 Aug 2023 03:10:39 -0700 (PDT) From: Amn Ojee Uw X-Google-Original-From: Amn Ojee Uw Content-Type: multipart/alternative; boundary="------------1kF0ENJV2hrUCGg0ueyAHB5f" Message-ID: Date: Wed, 16 Aug 2023 06:10:30 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 To: pgsql-general@lists.postgresql.org Subject: Creating a TABLESPACE Content-Language: en-CA List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------1kF0ENJV2hrUCGg0ueyAHB5f Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello children! I am learning how to create a tablespace, and AFAIK this are the steps to follow. First step is to create the directory where the database files will be created, for that I am using the root directory '/database'. This directory is be owned by the postgres group. Example : sudo mkdir /database sudo chown postgres:postgres /database I read the following documentation 1.) TABLESPACE 2.) seq_page_cost 3.) effective_io_concurrency 4.) maintenance_io_concurrency 5.) Tablespaces x.) effective_io_concurrency I then login PostgreSQL as so : sudo -u postgres psql. Note : _/*jamiil*/_ is an actual account, it does exist! I proceed to create the 'TABLESPACE' using the default values in PostgreSQL CREATE TABLESPACE jme_tablespace OWNER jamiil LOCATION '/database' WITH tablespace_option = seq_page_cost(1.0), random_page_cost (4.0), effective_io_concurrency (1), maintenance_io_concurrency (10); But then I get this error message: *ERROR:  syntax error at or near "tablespace_option"** **LINE 1: ...tablespace OWNER jamiil LOCATION '/database' WITH tablespace...* What did I go wrong? This exercise is not imperative, but as a student of PostgreSQL I'd like to try all there is to learn about PostgreSQL. Thanks in advance for your time and interest. --------------1kF0ENJV2hrUCGg0ueyAHB5f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hello children!

I am learning how to create a tablespace, and AFAIK this are the steps to follow.

First step is to create the directory where the database files will be created, for that I am using the root directory '/database'. This directory is be owned by the postgres group.

Example :
sudo mkdir /database
sudo chown postgres:postgres /database

I read the following documentation
1.) TABLESPACE

2.) seq_page_cost

3.) effective_io_concurrency

4.) maintenance_io_concurrency

5.) Tablespaces

x.) effective_io_concurrency

I then login PostgreSQL as so : sudo -u postgres psql.

Note : jamiil is an actual account, it does exist!

I proceed to create the 'TABLESPACE' using the default values in PostgreSQL

CREATE TABLESPACE jme_tablespace OWNER jamiil LOCATION '/database' WITH tablespace_option = seq_page_cost(1.0), random_page_cost (4.0), effective_io_concurrency (1), maintenance_io_concurrency (10);

But then I get this error message:
ERROR:  syntax error at or near "tablespace_option"
LINE 1: ...tablespace OWNER jamiil LOCATION '/database' WITH tablespace...

What did I go wrong?

This exercise is not imperative, but as a student of PostgreSQL I'd like to try all there is to learn about PostgreSQL.

Thanks in advance for your time and interest.

--------------1kF0ENJV2hrUCGg0ueyAHB5f--