<?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>DISCARD &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/discard/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>Tue, 19 Sep 2017 07:36:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>PostgreSQL: How to Clear Cache of the Database Sessions</title>
		<link>https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/</link>
					<comments>https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 03 Nov 2015 18:47:07 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[DISCARD]]></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 Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=1012</guid>

					<description><![CDATA[This is one of the important topics for PostgreSQL Database Administrator. Yes, it is true that PostgreSQL has a caching system. But I didn&#8217;t find any perfect solution for clearing the cache of PostgreSQL Server. If you want to clear cache, you should restart the PostgreSQL Server. In this post, I am sharing a short [&#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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" 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%2F2015%2F11%2Fpostgresql-how-to-clear-cache-of-the-database-sessions%2F&#038;title=PostgreSQL%3A%20How%20to%20Clear%20Cache%20of%20the%20Database%20Sessions" data-a2a-url="https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/" data-a2a-title="PostgreSQL: How to Clear Cache of the Database Sessions"></a></p><p>This is one of the important topics for PostgreSQL Database Administrator.<br />
Yes, it is true that PostgreSQL has a caching system.</p>
<blockquote><p>But I didn&#8217;t find any perfect solution for clearing the cache of PostgreSQL Server.<br />
If you want to clear cache, you should restart the PostgreSQL Server. </p></blockquote>
<p>In this post, I am sharing a short note on PostgreSQL Discard functionality to discard temp, the query plan for running sessions. </p>
<p><strong>Using DISCARD, you can release internal resources of the Database Sessions. </strong></p>
<p><strong>DISCARD TEMP:</strong> Using this, you can drop all temporary tables which are created in the current session. </p>
<p><strong>DISCARD PLANS:</strong> Using this, you can release all internal cached query plans. </p>
<p><strong>DISCARD ALL:</strong> Using this, you can reset a session to its original state. You cannot execute this command inside the transaction block. </p>
<p>Once you have executed DISCARD ALL, internally following sequence runs. </p>
<pre class="crayon-plain-tag">SET SESSION AUTHORIZATION DEFAULT;
RESET ALL;
DEALLOCATE ALL;
CLOSE ALL;
UNLISTEN *;
SELECT pg_advisory_unlock_all();
DISCARD PLANS;
DISCARD TEMP;</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2015/11/postgresql-how-to-clear-cache-of-the-database-sessions/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
	</channel>
</rss>
