<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>postgresql tablespace &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/postgresql-tablespace/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Sun, 17 Dec 2017 00:48:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>PostgreSQL: How to Create and Use Tablespace?</title>
		<link>https://www.dbrnd.com/2017/12/postgresql-how-to-create-and-use-tablespace-pg_global-pg_default/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 21 Dec 2017 16:16:21 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[pg_default]]></category>
		<category><![CDATA[pg_global]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[postgresql tablespace]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[Tablespace]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6876</guid>

					<description><![CDATA[As DBA and Architect, Database Tablespace is a most important thing for storage optimization. In this post, I am sharing my understanding of the PostgreSQL Tablespace. A tablespace is a defined disk space location for storing the database metadata and user data. The default tablespaces are pg_global and pg_default. The pg_global tablespace is used for [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2017%2F12%2Fpostgresql-how-to-create-and-use-tablespace-pg_global-pg_default%2F&#038;title=PostgreSQL%3A%20How%20to%20Create%20and%20Use%20Tablespace%3F" data-a2a-url="https://www.dbrnd.com/2017/12/postgresql-how-to-create-and-use-tablespace-pg_global-pg_default/" data-a2a-title="PostgreSQL: How to Create and Use Tablespace?"></a></p><p>As DBA and Architect, Database Tablespace is a most important thing for storage optimization. </p>
<p>In this post, I am sharing my understanding of the PostgreSQL Tablespace.</p>
<p>A tablespace is a defined disk space location for storing the database metadata and user data. The default tablespaces are pg_global and pg_default. The pg_global tablespace is used for shared system catalogs and pg_default is the default for other databases. </p>
<p><strong>Few advantages in short:</strong></p>
<blockquote><p>Can move important database metadata in a high-speed disk-like SSD Type</p>
<p>Can move important tables and indexes in a high-speed disk-like SSD Type</p>
<p>Can move temp tables and temp indexes in a sperate disk for better performance</p>
<p>Can manage and take the backup very easily</p>
<p>Not require to depend on one single disk block, and even single/default disk block/partition has also size limitation </p></blockquote>
<p><strong>Create a TABLESPACE:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLESPACE dbrnd LOCATION 'd:\';</pre> </p>
<p><strong>Create a new table in specific tablespace:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_test(rno int) TABLESPACE dbrnd;</pre> </p>
<p><strong>Change the default tablespace:</strong></p>
<pre class="crayon-plain-tag">SET default_tablespace = dbrnd;</pre> </p>
<p><strong>Now, try to create another table which will create in newly created tablespace:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_test2(rno int);</pre> </p>
<p><strong>Check the list of tablespaces:</strong></p>
<pre class="crayon-plain-tag">SELECT spcname FROM pg_tablespace;</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
