How to generate an error

yamakawayamakawa Vertica Customer

Hi.

Currently, we are planning to monitor vertica.log in regular operation.
We are currently planning to monitor vertica.log in regular operation, using "Insufficient" as a keyword, but we have not been able to verify whether it actually outputs as a message or not.
If you know how to generate an error to output as a log, please let me know.
Of course, the content should not affect the system!

Best Answer

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited December 2020 Answer ✓

    You could create a Resource Pool that has very little memory available to it, then run a query that needs more memory than is avialable...

    dbadmin=> CREATE RESOURCE POOL tiny MAXMEMORYSIZE '1K';
    CREATE RESOURCE POOL
    
    dbadmin=> SET RESOURCE_POOL = tiny;
    SET
    
    dbadmin=> SELECT COUNT(*) FROM biggie;
      COUNT
    ---------
     8388608
    (1 row)
    
    dbadmin=> SELECT * FROM biggie CROSS JOIN biggie b;
    ERROR 3587:  Insufficient resources to execute plan on pool tiny [Request Too Large:Threads Exceeded: Requested = 4, Free = 0 (Limit = 0, Used = 0); File Handles Exceeded: Requested = 4, Free = 0 (Limit = 0, Used = 0); Memory(KB) Exceeded: Requested = 7741, Free = 1 (Limit = 1, Used = 0)]
    
    dbadmin=> \! grep -i insufficient /home/dbadmin/verticademos/v_verticademos_node0001_catalog/vertica.log
    2020-12-11 13:32:20.098 Init Session:0x7f90ee7fc700-a0000000031b78 <ERROR> @v_verticademos_node0001: 53000/3587: Insufficient resources to execute plan on pool tiny [Request Too Large:Threads Exceeded: Requested = 4, Free = 0 (Limit = 0, Used = 0); File Handles Exceeded: Requested = 4, Free = 0 (Limit = 0, Used = 0); Memory(KB) Exceeded: Requested = 7741, Free = 1 (Limit = 1, Used = 0)]
    

Answers

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file