 schema         = require('./schema')
 
 {defaults, required} = misc
+
+is_fatal = (err) ->
+    return typeof(err) == 'string' and err.slice(0,5) == 'FATAL'
 
 # We represent synchronized tables by an immutable.js mapping from the primary
 # key to the object.  Since PostgresQL primary keys can be compound (more than

            @__is_saving = true
            @__save (err) =>
                @__is_saving = false
                if err?.slice(0,5) == 'FATAL'
                    @_fatal = true
                cb?(err)


                # 2. Now actually do the changefeed query.
                @_reconnect(cb)
        ], (err) =>
            if is_fatal(err)
                # This happens, e.g., when a user is no longer a collaborator on a project, or they are signed out
                # but still have a bunch of tabs open.  It avoids a huge amount of back and forth traffic between
                # the client and server.   WORRY: when they sign in, things will not just start working again...
