Jan Wieck JanWieck
Mon May 15 07:43:19 PDT 2006
On 5/15/2006 8:39 AM, Gavin Hamill wrote:

> Andrew Sullivan wrote:
> 
>>On Mon, May 15, 2006 at 10:15:13AM +0100, Gavin Hamill wrote:
>>  
>>
>>Hrm.  I'd still bet on data corruption.  You might try walking
>>through the table, getting all the data, in chunks, and see if you
>>get a failure.  
>>
> I just did a "pg_dump -F p"of that table alone in one fell swoop, and it 
> worked perfectly; it's left me a nice

This is a useless test. If the table contains any corruption of the kind 
we are suspecting, then the dump will simply contain NULL's in a PK. You 
won't be able to reload that dump into a table that defines that column 
NOT NULL, but the dump itself would happily work.

I have attached a patch that I am about to commit into REL_1_1_STABLE as 
well as HEAD. It will cause slon_quote_literal() to return a NULL result 
for a NULL input and the log trigger will bail out with an ERROR if one 
of the old key columns contains the NULL value. This will cause a 
transaction that happens to touch such a row to abort, instead of 
causing a postgres core dump.


Jan


> 
> COPY "RoomNight" ("ID", "BookingID", "RoomID", "Price", "Date", 
> "DateBooked", "Cancelled", "GuestName", "Adults", "Children", 
> "AllocationStatusID", "SmokingRequest", "BedRequested", "Incomplete", 
> "RoomNumber") FROM stdin;
> 
> followed by all 800k rows .. no segfaults, no errors at all :/
> 
>>Why does this happen roughly once a day?
>>  
>>
> 
> I'd hoped the corefile would've been able to tell me that, but seemingly 
> not :(
> 
> gdh
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/slony1-general


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: slony1_funcs.c.null-pk.patch
Url: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20060515/7961be23/slony1_funcs.c.null-pk.ksh



More information about the Slony1-general mailing list