TopMemoryContext logging without timestamp

Highlighted
Level 3 Adventurer

TopMemoryContext logging without timestamp

Some config changes are being testing in my environment regarding memory. With the changes in place, we're having memory issues, and PostgreSQL is throwing TopMemoryContext errors into the logs.  Unfortuantely, these do not start with a timestamp, so my Logstash grok filters are having a bad time with it.


Is there a config setting to configure the TopMemoryContext message to be formatted in the same way as the rest of the messages?


Samples below of multiple lines, starting with one that is parsed properly

 

2018-09-06 11:29:49 EDT [191288]: [1-1] user=enterprisedb,db=public,app=[unknown],client=127.0.0.1 FATAL:  out of memory
2018-09-06 11:29:49 EDT [191288]: [2-1] user=enterprisedb,db=public,app=[unknown],client=127.0.0.1 DETAIL:  Failed on request of size 160.
TopMemoryContext: 150144 total in 6 blocks; 60848 free (6 chunks); 89296 used
  pgstat TabStatusArray lookup hash table: 8192 total in 1 blocks; 1672 free (0 chunks); 6520 used
  TopTransactionContext: 8192 total in 1 blocks; 7960 free (1 chunks); 232 used
    TopTransactionContextResetAtSPLCommit: 0 total in 0 blocks; 0 free (0 chunks); 0 used
  RowDescriptionContext: 8192 total in 1 blocks; 7112 free (0 chunks); 1080 used
  MessageContext: 24576 total in 2 blocks; 14688 free (2 chunks); 9888 used
...

Archived Discussions


Effective March 31st, we will no longer engage on PostgresRocks.


How to engage with us further?


  • Thought Leadership: EDB Blogs

  • Tips and Tricks: Postgres Tutorials

  • Customer Support: Create a Case Please note: Only customers with an active EDB support subscription and support portal authorization can create support ticket

  • Engage on Stackoverflow While engaging on Stackoverflow tag the question with EDB or EnterpriseDB.

3 REPLIES 3
Highlighted
EDB Team Member

Re: TopMemoryContext logging without timestamp

Hi lgwapnitsky

 

TopMemoryContext errors is releated to message called Detail: Failed on request of size 160 so it is having timestamp 

2018-09-06 11:29:49 EDT [191288]: [2-1] user=enterprisedb,db=public,app=[unknown],client=127.0.0.1 DETAIL:  Failed on request of size 160.

 And also could you please check %t %m values are set in your log_line_prefix parameter in postgresql.conf file.

 

Hope this helps you.

Highlighted
Level 3 Adventurer

Re: TopMemoryContext logging without timestamp

Got it. So this may need yet another grok in logstash, then. One that handles the multiline and tabs for postgresql logs.


Thank you. I will keep you posted.

 

Highlighted
EDB Team Member

Re: TopMemoryContext logging without timestamp

Hi lgwapnitsky.

 

Thank you for the update. We will wait for your response.

© 2019 EnterpriseDB Corporation. All rights reserved.   |   Privacy Policy   |  Terms of Use   |   Trademarks