gp_toolkit.gp_log_system

Post date: Jan 20, 2014 9:55:36 PM

gpadmin=# \d gp_toolkit.gp_log_system

View "gp_toolkit.gp_log_system"

Column | Type | Modifiers 

----------------+--------------------------+-----------

logtime | timestamp with time zone | 

loguser | text | 

logdatabase | text | 

logpid | text | 

logthread | text | 

loghost | text | 

logport | text | 

logsessiontime | timestamp with time zone | 

logtransaction | integer | 

logsession | text | 

logcmdcount | text | 

logsegment | text | 

logslice | text | 

logdistxact | text | 

loglocalxact | text | 

logsubxact | text | 

logseverity | text | 

logstate | text | 

logmessage | text | 

logdetail | text | 

loghint | text | 

logquery | text | 

logquerypos | integer | 

logcontext | text | 

logdebug | text | 

logcursorpos | integer | 

logfunction | text | 

logfile | text | 

logline | integer | 

logstack | text | 

View definition:

SELECT __gp_log_segment_ext.logtime, __gp_log_segment_ext.loguser, __gp_log_segment_ext.logdatabase, __gp_log_segment_ext.logpid, __gp_log_segment_ext.logthread, __gp_log_segment_ext.loghost, __gp_log_segment_ext.logport, __gp_log_segment_ext.logsessiontime, __gp_log_segment_ext.logtransaction, __gp_log_segment_ext.logsession, __gp_log_segment_ext.logcmdcount, __gp_log_segment_ext.logsegment, __gp_log_segment_ext.logslice, __gp_log_segment_ext.logdistxact, __gp_log_segment_ext.loglocalxact, __gp_log_segment_ext.logsubxact, __gp_log_segment_ext.logseverity, __gp_log_segment_ext.logstate, __gp_log_segment_ext.logmessage, 

__gp_log_segment_ext.logdetail, __gp_log_segment_ext.loghint, __gp_log_segment_ext.logquery, __gp_log_segment_ext.logquerypos, __gp_log_segment_ext.logcontext, __gp_log_segment_ext.logdebug, __gp_log_segment_ext.logcursorpos, __gp_log_segment_ext.logfunction, __gp_log_segment_ext.logfile, __gp_log_segment_ext.logline, __gp_log_segment_ext.logstack

FROM ONLY gp_toolkit.__gp_log_segment_ext

UNION ALL 

SELECT __gp_log_master_ext.logtime, __gp_log_master_ext.loguser, __gp_log_master_ext.logdatabase, __gp_log_master_ext.logpid, __gp_log_master_ext.logthread,__gp_log_master_ext.loghost, __gp_log_master_ext.logport, __gp_log_master_ext.logsessiontime, __gp_log_master_ext.logtransaction, __gp_log_master_ext.logsession, __gp_log_master_ext.logcmdcount, __gp_log_master_ext.logsegment, __gp_log_master_ext.logslice, __gp_log_master_ext.logdistxact, __gp_log_master_ext.loglocalxact, __gp_log_master_ext.logsubxact, __gp_log_master_ext.logseverity, __gp_log_master_ext.logstate, __gp_log_master_ext.logmessage, __gp_log_master_ext.logdetail, __gp_log_master_ext.loghint, __gp_log_master_ext.logquery, __gp_log_master_ext.logquerypos, __gp_log_master_ext.logcontext, __gp_log_master_ext.logdebug, __gp_log_master_ext.logcursorpos, __gp_log_master_ext.logfunction, __gp_log_master_ext.logfile, __gp_log_master_ext.logline, __gp_log_master_ext.logstack

FROM ONLY gp_toolkit.__gp_log_master_ext

ORDER BY 1;

logtime=>The timestamp of the log message.

loguser=>The name of the database user.

logdatabase=>The name of the database.

logpid=>The associated process id (prefixed with "p").

logthread=>The associated thread count (prefixed with "th").

loghost=>The segment or master host name.

logport=>The segment or master port.

logsessiontime=>Time session connection was opened.

logtransaction=>Global transaction id.

logsession=>The session identifier (prefixed with "con").

logcmdcount=>The command number within a session (prefixed with "cmd").

logsegment=>The segment content identifier (prefixed with "seg" for primary or "mir" for mirror. The master always has a content id of -1).

logslice=>The slice id (portion of the query plan being executed).

logdistxact=>Distributed transaction id.

loglocalxact=>Local transaction id.

logsubxact=>Subtransaction id.

logseverity=>LOG, ERROR, FATAL, PANIC, DEBUG1 or DEBUG2.

logstate=>SQL state code associated with the log message.

logmessage=>Log or error message text.

logdetail=>Detail message text associated with an error message.

loghint=>Hint message text associated with an error message.

logquery=>The internally-generated query text.

logquerypos=>The cursor index into the internally-generated query text.

logcontext=>The context in which this message gets generated.

logdebug=>Query string with full detail for debugging.

logcursorpos=>The cursor index into the query string.

logfunction=>The function in which this message is generated.

logfile=>The log file in which this message is generated.

logline=>The line in the log file in which this message is generated.

logstack=>Full text of the stack trace associated with this message.

This view uses an external table to read the server log files of the entire Greenplum system (master, segments, and mirrors) and lists all log entries. Associated log entries can be identified by the session id (logsession) and command id (logcmdcount). The use of this view requires superuser permissions.

gpadmin=# select * from gp_toolkit.gp_log_system limit 10;

logtime | loguser | logdatabase | logpid | logthread | loghost | logport | logsessiontime | logtransaction | logsession | logcmdcou

nt | logsegment | logslice | logdistxact | loglocalxact | logsubxact | logseverity | logstate | 

logmessage | logdetail | loghint | logquery | logquerypos | lo

gcontext | logdebug | logcursorpos | logfunction | logfile | logline | logstack 

-------------------------------+---------+-------------+--------+--------------+---------+---------+----------------+----------------+------------+----------

---+------------+----------+-------------+--------------+------------+-------------+----------+--------------------------------------------------------------

----------------------------------------------------------------------------------------------------------+-----------+---------+----------+-------------+---

---------+----------+--------------+-------------+---------+---------+----------

2013-11-27 12:51:33.08036-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | database system was shut down at 2013-11-27 12:51:32 EST 

| | | | | 

| | 0 | | xlog.c | 6394 | 

2013-11-27 12:51:33.080475-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | checkpoint record is at 0/8ABA78 

| | | | | 

| | 0 | | xlog.c | 6493 | 

2013-11-27 12:51:33.080507-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | redo record is at 0/8ABA78; undo record is at 0/0; shutdown T

RUE | | | | | 

| | 0 | | xlog.c | 6602 | 

2013-11-27 12:51:33.08053-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | next transaction ID: 0/902; next OID: 10901 

| | | | | 

| | 0 | | xlog.c | 6606 | 

2013-11-27 12:51:33.080551-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | next MultiXactId: 1; next MultiXactOffset: 0 

| | | | | 

| | 0 | | xlog.c | 6609 | 

2013-11-27 12:51:33.08059-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | end of transaction log location is 0/8ABAF0 

| | | | | 

| | 0 | | xlog.c | 6840 | 

2013-11-27 12:51:33.081056-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | Oldest active transaction from prepared transactions 902 

| | | | | 

| | 0 | | xlog.c | 6202 | 

2013-11-27 12:51:33.346109-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | database system is ready 

| | | | | 

| | 0 | | xlog.c | 6231 | 

2013-11-27 12:51:33.346179-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | PostgreSQL 8.2.15 (Greenplum Database 4.2.2.4 build 1 Communi

ty Edition) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Oct 17 2012 11:48:43 | | | | | 

| | 0 | | xlog.c | 6241 | 

2013-11-27 12:51:33.432896-05 | | | p10227 | th-509053184 | | | | 0 | | 

| seg-1 | | | | | LOG | 00000 | Finished normal startup for clean shutdown case 

| | | | | 

| | 0 | | xlog.c | 7071 | 

(10 rows)