Received: from bugs.unl.edu.ar (bugs.unl.edu.ar [168.96.132.208]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f77MMa650409 for ; Tue, 7 Aug 2001 18:22:37 -0400 (EDT) (envelope-from martin@bugs.unl.edu.ar) Received: from localhost (localhost [127.0.0.1]) by bugs.unl.edu.ar (Postfix) with ESMTP id CDDF72AB43 for ; Tue, 7 Aug 2001 19:22:10 -0300 (GMT) Received: by bugs.unl.edu.ar (Postfix, from userid 1004) id 6C5312AB38; Tue, 7 Aug 2001 19:22:08 -0300 (GMT) Content-Type: text/plain; charset="iso-8859-1" From: =?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= To: pgsql sql Mailing List Subject: loop on a rule Date: Tue, 7 Aug 2001 19:22:07 -0300 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01080719220707.11074@bugs> Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200108/112 X-Sequence-Number: 4333 As I said before, I am playing around with views and rules, and found out that I have something wrong in one of the rules. My delete rule says something like this: CREATE RULE admin_delete AS ON DELETE TO admin_view DO INSTEAD ( DELETE FROM carrera WHERE id_curso=old.id_curso; DELETE FROM inscripcion WHERE carrera=old.id_curso; DELETE FROM resol WHERE carr=old.id_curso; DELETE FROM modalidad WHERE carrera=old.id_curso; INSERT INTO log_carrera (accion,tabla) VALUES ('D','carrera'); ); Where id_curso is an identifier to which inscripcion.carrera, resol.carr and modalidad.carrera are REFERENCED to. When I try to execute a query like this: DELETE FROM admin_view WHERE id_curso=2; I get a lost connection and this on the log: 2001-08-07 19:08:40 DEBUG: ProcessQuery 2001-08-07 19:08:40 DEBUG: CommitTransactionCommand 2001-08-07 19:08:43 DEBUG: StartTransactionCommand 2001-08-07 19:08:43 DEBUG: query: DELETE FROM admin_view WHERE id_curso=2; XLogFlush: rqst 0/0; wrt 0/62940168; flsh 0/62940168 XLogFlush: rqst 0/57764568; wrt 0/62940168; flsh 0/62940168 2001-08-07 19:08:44 DEBUG: ProcessQuery INSERT @ 0/62940168: prev 0/62940128; xprev 0/0; xid 21593; bkpb 1: Heap - delete: node 290095/290371; tid 0/2 /usr/local/pgsql/bin/postmaster: reaping dead processes... /usr/local/pgsql/bin/postmaster: CleanupProc: pid 12353 exited with status 138 Server process (pid 12353) exited with status 138 at Tue Aug 7 19:08:45 2001 Terminating any active server processes... Server processes were terminated at Tue Aug 7 19:08:45 2001 Reinitializing shared memory and semaphores invoking IpcMemoryCreate(size=1245184) 2001-08-07 19:08:45 DEBUG: database system was interrupted at 2001-08-07 19:08:13 GMT 2001-08-07 19:08:45 DEBUG: CheckPoint record at (0, 62658256) 2001-08-07 19:08:45 DEBUG: Redo record at (0, 62610224); Undo record at (0, 0); Shutdown FALSE 2001-08-07 19:08:45 DEBUG: NextTransactionId: 21527; NextOid: 313116 2001-08-07 19:08:45 DEBUG: database system was not properly shut down; automatic recovery in progress... /usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6 /usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6 /usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6 /usr/local/pgsql/bin/postmaster: ServerLoop: handling reading 6 The Data Base System is starting up /usr/local/pgsql/bin/postmaster: ServerLoop: handling writing 62 And after that tns of REDOs (which I guess are OK). Does that ServerLoop belong to REDO or is it part of my problem? Any ideas? -- Cualquiera administra un NT. Ese es el problema, que cualquiera administre. ----------------------------------------------------------------- Martin Marques | mmarques@unl.edu.ar Programador, Administrador | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------