Chris Browne cbbrowne at lists.slony.info
Fri Feb 16 15:35:15 PST 2007
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main:/tmp/cvs-serv15962/doc/adminguide

Modified Files:
	loganalysis.sgml 
Log Message:
Add in notes about the "NULLable column" issue.

We had a fix in 1.2 that refuses to replicate if the PK candidate has
columns that are NULLable.

There may be 1.1 replicas that have this condition; needed to document
how to find the problem, and deal with it, if need be...


Index: loganalysis.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/loganalysis.sgml,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** loganalysis.sgml	2 Feb 2007 20:24:16 -0000	1.7
--- loganalysis.sgml	16 Feb 2007 23:35:13 -0000	1.8
***************
*** 746,754 ****
  <listitem><para><command>NOTICE: Slony-I setAddTable_int(): table % PK column % nullable</command></para> 
  
! <para> You tried to replicate a table where one of the columns in the would-be primary key is allowed to be null.  All PK columns must be <command>NOT NULL.</command> This request is about to fail. </para></listitem>
  <listitem><para><command>ERROR: Slony-I setAddTable_int(): table % not replicable!</command></para> 
  
! <para> 
! This happens because of the NULLable PK column. </para></listitem>
  <listitem><para><command>ERROR: Slony-I setAddTable_int(): table id % has already been assigned!</command></para> 
  
--- 746,785 ----
  <listitem><para><command>NOTICE: Slony-I setAddTable_int(): table % PK column % nullable</command></para> 
  
! <para> You tried to replicate a table where one of the columns in the would-be primary key is allowed to be null.  All PK columns must be <command>NOT NULL.</command> This request is about to fail. </para>
! 
! <para> A check for this condition was introduced in &slony1; version
! 1.2.  If you have a 1.1 replica, it will continue to function after
! upgrading to 1.2, but you will experience this complaint when you try
! to add new subscribers. </para>
! 
! <para> You can look for table/index combinations on an existing
! node that have NULLABLE columns in the primary key via the
! following query:
! <screen>
! select c.relname as table_name, ic.relname as index_name, att.attname, att2.attnotnull
! from _cluster.sl_table t, pg_catalog.pg_class c, pg_index i, pg_catalog.pg_class ic, pg_catalog.pg_attribute att, pg_catalog.pg_attribute att2
! where t.tab_reloid = c.oid 
!     and t.tab_idxname = ic.relname 
!     and  ic.oid = i.indexrelid
!     and att.attrelid = i.indexrelid
!     and att2.attname = att.attname
!     and att2.attrelid = c.oid
!     and att2.attnotnull = 'f';
! </screen> </para>
! 
! <para> These may be rectified via submitting, for each one, a query of
! the form: <command> alter table mytable alter column nullablecol set
! not null; </command> Running this against a subscriber where the table
! is empty will complete very quickly. It will take longer to apply this
! change to a table that already contains a great deal of data, as the
! alteration will scan the table to verify that there are no tuples
! where the column is NULL.
! </para>
! 
! </listitem>
! 
  <listitem><para><command>ERROR: Slony-I setAddTable_int(): table % not replicable!</command></para> 
  
! <para> This happens because of the NULLable PK column. </para></listitem>
  <listitem><para><command>ERROR: Slony-I setAddTable_int(): table id % has already been assigned!</command></para> 
  



More information about the Slony1-commit mailing list