
Can you run a server built from source with debugging enabled? When I was having problems with MERGE tables, that was the only way to figure out what was going wrong. It sounds like you have a reproducible test case. From: users-list [mailto:users-list-bounces+david.b.anderson=citi.com@monetdb.org] On Behalf Of Ariel Abadi Sent: Sunday, July 17, 2016 11:22 PM To: Communication channel for MonetDB users Subject: Re: MERGE TABLE ERROR We are having a serious problem. Every time the DB starts doing crazy things with the MERGE tables (as described in the email attached). The DB crashes for ever. 2016-07-17 23:51:29 MSG merovingian[10151]: database 'trafico' (10165) was killed by signal SIGSEGV 2016-07-17 23:51:29 ERR control[10151]: (local): failed to fork mserver: database 'trafico' appears to shut itself down after starting, check monetdbd's logfile for possible hints 2016-07-17 23:52:16 MSG merovingian[10151]: caught SIGTERM, starting shutdown sequence 2016-07-17 23:52:19 MSG merovingian[10151]: Merovingian 1.7 stopped 2016-07-17 23:52:19 MSG control[10151]: control channel closed The only way to recover is creating a newly fresh DBFARM. If anyone knows something please help me!. We are creating the DB every week :( Ariel Abadi Direct: +54 11 5279.2054 Mobile:+54 9 11 6050.0101 Email: aabadi@starconnecting.com<mailto:aabadi@starconnecting.com> Web: www.starconnecting.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.starconnecting.com&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=F97qUo-qi7nXgmnzI_zs_JPUY1_Gdbuxk73xGr75Kik&e=> On Sun, Jul 17, 2016 at 8:09 PM, Ariel Abadi <aabadi@starconnecting.com<mailto:aabadi@starconnecting.com>> wrote: Hi! We are facing a problem with MERGE Tables. We have a process in php which connects to the DB using the mapi (https://www.monetdb.org/Documentation/Manuals/SQLreference/Programming/MAPI<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.google.com_url-3Fq-3Dhttps-253A-252F-252Fwww.monetdb.org-252FDocumentation-252FManuals-252FSQLreference-252FProgramming-252FMAPI-26sa-3DD-26sntz-3D1-26usg-3DAFQjCNGpR9jSaQKxbmqRuVF8krphUQBn1g&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=TCBRhMVJpBqohBAbnbUVvgYKPiKFqjtu1E5YpbJopNU&e=>) The process creates a new table everyday as follows: CREATE TABLE cub8_20160717 AS (SELECT * FROM cub8) WITH NO DATA; Then, attaches that new table to the MERGE table called cub8_cubo as follows: ALTER TABLE cub8_cubo ADD TABLE cub8_20160717 ; Once all this is created, it start inserting data. Everything works fine, with NO errors. BUT if I run a query against cub8_cubo I dont see cub8_20160717 data. So I run this query in order to check if the new table was attached to the merge: SELECT a.name<https://urldefense.proofpoint.com/v2/url?u=http-3A__a.name&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=ZnIDaE5j_yUr6kSrOOE4Cq3warOfS07K_mIaeOwegkM&e=>, b.name<https://urldefense.proofpoint.com/v2/url?u=http-3A__b.name&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=_JclMJpcqhsINlwHeS8ktjB0_9RuNyYUbZ-cWZjugP0&e=>, s.name<https://urldefense.proofpoint.com/v2/url?u=http-3A__s.name&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=8ilEeDdElFocGAbnSPq-W29d3JFq16BYH0toUBKbg7E&e=> FROM sys.tables as a JOIN sys.dependencies d ON a.id<https://urldefense.proofpoint.com/v2/url?u=http-3A__a.id&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=1_-oTcb5B--YfIwGbvdu9ZiQDpG7hiPmu0AT4pTkvCA&e=> = d.depend_id JOIN sys.tables as b ON b.id<https://urldefense.proofpoint.com/v2/url?u=http-3A__b.id&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=ys7CybxwWMK332gjlTpc32DRDwp5s0jYgVCOHCCqKJU&e=>= d.id<https://urldefense.proofpoint.com/v2/url?u=http-3A__d.id&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=N4PPkvTlKUfkg02qExjB4obAPJlr8-MBAEY0eFDAD10&e=> JOIN sys.schemas as s ON a.schema_id = s.id<https://urldefense.proofpoint.com/v2/url?u=http-3A__s.id&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=6dEMFdZ5wFejqBuipNcFWMuLaLfKkE5ifGCPSlIcC9o&e=> WHERE a.type= 3 AND a.name<https://urldefense.proofpoint.com/v2/url?u=http-3A__a.name&d=CwMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=8_GYjk1edsyLJlNaxMxYxBJsviF3JXYvwDK42uy5KWU&m=KRZtgsAHenCyBgFZm9GAQBp03krybbhwPad-dLGK_cQ&s=ZnIDaE5j_yUr6kSrOOE4Cq3warOfS07K_mIaeOwegkM&e=> ILIKE '%cub8%' ORDER BY 1,2; +-----------+---------------+ | name | name | +===========+===============+ | cub8_cubo | cub8_20160710 | | cub8_cubo | cub8_20160711 | | cub8_cubo | cub8_20160712 | | cub8_cubo | cub8_20160713 | | cub8_cubo | cub8_20160714 | | cub8_cubo | cub8_20160715 | | cub8_cubo | cub8_20160716 | | cub8_cubo | cub8_20160717 | So I try to detached from cub8_cubo, with the command: ALTER TABLE cub8_cubo DROP TABLE cub8_20160717; ALTER TABLE: table 'sb_traf.cub8_20160717' isn't part of the MERGE TABLE 'sb_traf.cub8_cubo' So I ADD it again: ALTER TABLE cub8_cubo ADD TABLE cub8_20160717; and now yes... I can see the data. If I need to detach that table, I need to run ALTER ... DROP twice or three times to get it done. It seems to be a bug?, are we doing something wrong ?? Thks in advance! PS.:We are using MonetDB Database Server v1.7 (Jun2016) Welcome to mclient, the MonetDB/SQL interactive terminal (Jun2016)