<p>I am considering log-shipping of <a href="http://www.postgresql.org/docs/8.2/static/runtime-config-wal.html" rel="noreferrer">Write Ahead Logs (WAL)</a> in PostgreSQL to create a warm-standby database. However I have one table in the database that receives a huge amount of INSERT/DELETEs each day, but which I don't care about protecting the data in it. To reduce the amount of WALs produced I was wondering, <strong>is there a way to prevent any activity on one table from being recorded in the WALs?</strong></p>

[{'answer_id': 39031, 'author': 'Greg Hewgill', 'author_id': 893, 'author_profile': 'https://Stackoverflow.com/users/893', 'pm_score': 4, 'selected': True, 'text': "<p>Unfortunately, I don't believe there is. The WAL logging operates on the page level, which is much lower than the table level and doesn't even know which page holds data from which table. In fact, the WAL files don't even know which pages belong to which <em>database</em>.</p>\n\n<p>You might consider moving your high activity table to a completely different instance of PostgreSQL. This seems drastic, but I can't think of another way off the top of my head to avoid having that activity show up in your WAL files.</p>\n"}, {'answer_id': 41592, 'author': 'Guy C', 'author_id': 4045, 'author_profile': 'https://Stackoverflow.com/users/4045', 'pm_score': 0, 'selected': False, 'text': '<p>To offer one option to my own question. There are <a href="http://www.postgresql.org/docs/8.3/interactive/sql-createtable.html" rel="nofollow noreferrer">temp tables</a> - "temporary tables are automatically dropped at the end of a session, or optionally at the end of the current transaction (see ON COMMIT below)" - which I think don\'t generate WALs. Even so, this might not be ideal as the table creation &amp; design will be have to be in the code.</p>\n'}, {'answer_id': 816267, 'author': 'Ken Arnold', 'author_id': 69707, 'author_profile': 'https://Stackoverflow.com/users/69707', 'pm_score': -1, 'selected': False, 'text': '<p>I\'d consider <a href="http://www.danga.com/memcached/" rel="nofollow noreferrer">memcached</a> for use-cases like this. You can even spread the load over a bunch of cheap machines too.</p>\n'}, {'answer_id': 7939450, 'author': 'xzilla', 'author_id': 108247, 'author_profile': 'https://Stackoverflow.com/users/108247', 'pm_score': 4, 'selected': False, 'text': '<p>Ran across this old question, which now has a better answer. Postgres 9.1 introduced "Unlogged Tables", which are tables that don\'t log their DML changes to WAL. See the docs for more info, but at least now there is a solution for this problem. </p>\n\n<p>See <a href="http://www.depesz.com/2011/01/03/waiting-for-9-1-unlogged-tables/" rel="nofollow">Waiting for 9.1 - UNLOGGED tables</a> by depesz, and the <a href="http://www.postgresql.org/docs/9.1/static/sql-createtable.html" rel="nofollow">9.1 docs</a>.</p>\n'}]
['https://Stackoverflow.com/questions/38090', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4045/']