On 03/19/2014 02:01 PM, Alvaro Herrera wrote: > Josh Berkus wrote: >> All, >> >> So, I'll ask again (because I didn't see a reply): is there any way >> users can *check* if they've been corrupted? Short of waiting for PK/FK >> violations? > > Obviously there are queries you can run to check each FK -- the same > queries that ri_triggers.c would run when you create an FK. It's > cumbersome to write, but not impossible. In fact, it can be done > mechanically.
Would users which this corruption necessarily have broken FKs which would show up as such on a simple query? That is, if I did: SELECT ref_id FROM referenced WHERE ref_id NOT IN ( SELECT ref_id FROM referencing ) ... or something similar, would that show the issue? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers