Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without
Date: 2010-02-01 09:33:44
Message-ID: 4B669FF8.806@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Simon Riggs wrote:
> I'm seeing these messages in the standby server log:
> 
> WARNING:  unlogged operation performed, data may be missing
> HINT:  This can happen if you temporarily disable archive_mode without
> taking a new base backup.
> CONTEXT:  xlog redo unlogged operation: heap inserts on "pg_temp_65646"
> 
> which connected with operations on temp tables, probably as a result of
> VACUUM FULL and CLUSTER.
> 
> I don't think those messages should be there.

Hmm. The "unlogged" record is written here:

...
void
heap_sync(Relation rel)
{
	char reason[NAMEDATALEN + 30];

	/* temp tables never need fsync */
	if (rel->rd_istemp)
		return;

	snprintf(reason, sizeof(reason), "heap inserts on \"%s\"",
			 RelationGetRelationName(rel));
	XLogReportUnloggedStatement(reason);
...


So it clearly shouldn't be written for temp relations. Apparently the
rd_istemp flag not set correctly after CLUSTER / VACUUM FULL.

Can you reproduce that?

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2010-02-01 09:53:36
Subject: Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without
Previous:From: Greg StarkDate: 2010-02-01 09:33:08
Subject: Re: Hot Standby and VACUUM FULL

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-02-01 09:53:36
Subject: Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without
Previous:From: Simon RiggsDate: 2010-02-01 08:40:57
Subject: Re: [COMMITTERS] pgsql: Write a WAL record whenever we perform an operation without

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group