Jeff threshar at torgo.978.org
Fri Oct 23 07:57:12 PDT 2009
Just ran into this problem - the origin is 8.2, replica is 8.4.1

2009-10-23 10:47:42 EDT DEBUG1 copy_set 3
2009-10-23 10:47:42 EDT DEBUG1 remoteWorkerThread_1: connected to  
provider DB
2009-10-23 10:47:42 EDT WARN   remoteWorkerThread_1: transactions  
earlier than XID 3820504992 are still in progress
2009-10-23 10:47:42 EDT WARN   remoteWorkerThread_1: data copy for set  
3 failed - sleep 60 seconds
NOTICE:  there is no transaction in progress
2009-10-23 10:48:42 EDT DEBUG1 copy_set 3
2009-10-23 10:48:42 EDT DEBUG1 remoteWorkerThread_1: connected to  
provider DB
2009-10-23 10:48:42 EDT ERROR  remoteWorkerThread_1: Could not lock  
table "public"."companyinfo" on subscriber
2009-10-23 10:48:42 EDT WARN   remoteWorkerThread_1: data copy for set  
3 failed - sleep 60 seconds
NOTICE:  there is no transaction in progress

In the PG log
LOG:  checkpoint starting: time
ERROR:  LOCK TABLE can only be used in transaction blocks
STATEMENT:  lock table "public"."companyinfo";
	
It seems in 8.4 you can only LOCK table inside a txn where it worked  
outside of a txn previously.

My hack solution until I can code something up is to restart slon -  
this seems to fix the issue.
I suspect there's a missing BEGIN in the retry loop in slon - I've  
seen slon get into semi-buggered states like this on 8.2 before but  
figured it was a fluke.

indie=> select version();
                                                   version
------------------------------------------------------------------------------------------------------------
  PostgreSQL 8.2.11 on x86_64-unknown-linux-gnu, compiled by GCC gcc  
(GCC) 4.1.2 20070925 (Red Hat 4.1.2-27)
(1 row)

indie=> lock table companyinfo;
LOCK TABLE

---

------------------------------------------------------------------------------------------------------------------
  PostgreSQL 8.4.1 on x86_64-unknown-linux-gnu, compiled by GCC gcc  
(GCC) 4.3.2 20081105 (Red Hat 4.3.2-7), 64-bit
(1 row)

indie=> lock table companyinfo;
ERROR:  LOCK TABLE can only be used in transaction blocks

--
Jeff Trout <jeff at jefftrout.com>
http://www.stuarthamm.net/
http://www.dellsmartexitin.com/





More information about the Slony1-general mailing list