Pivotal Knowledge Base


ERROR: missing data for column "loguser"


Product Version
Pivotal HDB  All
Pivotal Greenplum  All


Unable to query data from hawq_toolkit.hawq_log_database table

Error Message:

gpadmin=# select * from hawq_toolkit.hawq_log_database limit 10;

ERROR:  missing data for column "loguser"
CONTEXT:  External table __hawq_log_master_ext, line nnnnn of execute:cat $GP_SEG_DATADIR/pg_log/*.csv: " "


Someone investigated the master's pg_log and has left a blank line with a space as below. 

Master's pg_log -
[ ] <<<=== A blank line with a space character
2016-08-31 00:13:24.948900 EDT,"gpadmin","gpadmin",p23325,th1256007712,"","37404",2016-08-31 00:13:24 EDT,0,con1,,seg-1,,,,,"LOG","00000","--------------------------",,,,,,,0,,"cdblogsync.c",230,


From pg_log directory, identify .csv file with the invalid blank line and remove it from the file.


Additional Information

To identify the .csv file with an invalid blank line and its location you can use following methods -

1. cd <pg_log_dir>; cat -b *.csv | grep 'nnnnn'    # where 'nnnnn' is the line number from the error msg. This will give you rough idea over the location of the invalid log entry.

2. egrep '^ $' *.csv  # this command will identify files with blank lines with a space character. 




Powered by Zendesk