Buenas tardes, Tengo una función llamada get_columnames que retorna los nombres de las columnas de una tabla, pasándole los números de los atributos. Realmente ya pensé muchísimo, pero no comprendo porqué pero la función falla luego de la ejecución de la expresión: appendStringInfo (& cols, "% s a.attnum =% d", (i> 0? "OR": ""), idxcd-> varattno [i]); El error me aparece solamente cuando se ingresa al ciclo: foreach (cell, candidates) / * foreach cell in candidates * / más de una vez, es decir, cuando se tiene más de un índice candidato. Si se ingresa al ciclo solo una vez, la función trabaja correctamente. El error que me aparece es que la conexión al servidor PostgreSQL directamente se pierde. Probé que el error ocurre en esa sentencia, imprimiendo algunos valores. El error que me aparece es el siguiente: The connection to the server was lost. Attempting reset: Failed. Adjunto el código fuente de la función (función.c) y el archivo de log con la salida de las últimas ejecuciones. Aclaro que el ciclo foreach para el lenguaje c está definido en #include "nodes / pg_list.h" Les pido mil disculpas por mis consultas recurrentes sobre estos temas, pero es que realmente estoy estancada ahora mismo con esto y nosé cómo avanzar. Y este es el único grupo donde encuentro ayuda. Agradeceré mucho una ayuda por favor. Saludos cordiales, Yessica Brinkmann
FATAL: the database system is in recovery mode LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: database system was shut down at 2019-10-04 00:58:21 CEST LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: server process (PID 1245) was terminated by signal 11: Segmentation fault LOG: terminating any other active server processes LOG: all server processes terminated; reinitializing LOG: database system was interrupted; last known up at 2019-10-04 02:08:57 CEST LOG: database system was not properly shut down; automatic recovery in progress FATAL: the database system is in recovery mode LOG: redo starts at 0/BEE6A00 LOG: record with zero length at 0/BEFA848 LOG: redo done at 0/BEFA818 LOG: last completed transaction was at log time 2019-10-04 02:11:33.931119+02 LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: server process (PID 1388) was terminated by signal 11: Segmentation fault LOG: terminating any other active server processes LOG: all server processes terminated; reinitializing LOG: database system was interrupted; last known up at 2019-10-04 02:11:44 CEST LOG: database system was not properly shut down; automatic recovery in progress LOG: redo starts at 0/BEFA890 LOG: record with zero length at 0/BF0F940 LOG: redo done at 0/BF0F910 LOG: last completed transaction was at log time 2019-10-04 02:17:13.560035+02 FATAL: the database system is in recovery mode LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: received smart shutdown request LOG: received SIGHUP, reloading configuration files LOG: autovacuum launcher shutting down LOG: shutting down LOG: database system is shut down LOG: database system was shut down at 2019-10-04 02:36:09 CEST LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: server process (PID 1271) was terminated by signal 11: Segmentation fault LOG: terminating any other active server processes LOG: all server processes terminated; reinitializing LOG: database system was interrupted; last known up at 2019-10-04 15:44:07 CEST LOG: database system was not properly shut down; automatic recovery in progress FATAL: the database system is in recovery mode LOG: redo starts at 0/BF0F9D0 LOG: unexpected pageaddr 0/5F14000 in log file 0, segment 11, offset 15810560 LOG: redo done at 0/BF13140 LOG: last completed transaction was at log time 2019-10-04 15:46:27.151167+02 LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: server process (PID 1565) was terminated by signal 11: Segmentation fault LOG: terminating any other active server processes LOG: all server processes terminated; reinitializing LOG: database system was interrupted; last known up at 2019-10-04 15:46:53 CEST LOG: database system was not properly shut down; automatic recovery in progress FATAL: the database system is in recovery mode LOG: redo starts at 0/BF13998 LOG: record with zero length at 0/BF2A1C0 LOG: redo done at 0/BF2A190 LOG: last completed transaction was at log time 2019-10-04 16:05:58.835759+02 LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: server process (PID 1847) was terminated by signal 11: Segmentation fault LOG: terminating any other active server processes LOG: all server processes terminated; reinitializing LOG: database system was interrupted; last known up at 2019-10-04 16:06:07 CEST LOG: database system was not properly shut down; automatic recovery in progress FATAL: the database system is in recovery mode LOG: redo starts at 0/BF2A208 LOG: record with zero length at 0/BF3FAD0 LOG: redo done at 0/BF3FAA0 LOG: last completed transaction was at log time 2019-10-04 16:24:48.038614+02 LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: received smart shutdown request LOG: received SIGHUP, reloading configuration files LOG: autovacuum launcher shutting down LOG: shutting down LOG: database system is shut down LOG: database system was shut down at 2019-10-04 16:29:42 CEST LOG: database system is ready to accept connections LOG: autovacuum launcher started LOG: received smart shutdown request LOG: received SIGHUP, reloading configuration files LOG: autovacuum launcher shutting down LOG: shutting down LOG: database system is shut down
función.c
Description: Binary data