PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16165
PG Version12.1
OSWindows Server 2016
Opened2019-12-14 03:44:37+00
Reported bySasuke Vita
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16165
Logged by:          Sasuke Vita
Email address:      (redacted)
PostgreSQL version: 12.1
Operating system:   Windows Server 2016
Description:        

i just realize when see postgre log, seeing so many spam log, it was query
for insertbulk from my app.

i try to manual produce the error using PGAdmin 4.16, then execute sql:

CREATE TABLE "#LOG_TEMP"
	 (
	 "TerminalId" integer NOT NULL,
	 "PIN" character varying(20) COLLATE pg_catalog."default" NOT NULL,
	 "AttDate" date NOT NULL,
	 "AttHourMinute" time without time zone NOT NULL,
	 "AttTime" time without time zone NOT NULL,
	 "InOutMode" integer NOT NULL,
	 "VerifyMode" smallint NOT NULL,
	 "WorkCode" integer
	 );
	INSERT INTO
"#LOG_TEMP"("TerminalId","PIN","AttDate","AttHourMinute","AttTime","InOutMode","VerifyMode","WorkCode")
	VALUES(436,'203030029','2020-01-01','12:34:00','12:34:56',1,0,NULL),
	(436,'203030029','2020-01-01','13:34:00','13:34:56',1,0,NULL);
	
	WITH "cte" AS ( SELECT ROW_NUMBER() OVER(PARTITION BY "TerminalId", "PIN",
"AttDate", "AttHourMinute" ORDER BY "AttDate" DESC, "AttTime" DESC) AS
"RN",
	"TerminalId", "PIN", "AttDate", "AttHourMinute", "AttTime", "InOutMode",
"VerifyMode", "WorkCode" FROM "#LOG_TEMP" )
	INSERT INTO "IClock"."LOG_TEMP"("TerminalId",
"PIN","AttDate","AttHourMinute","AttTime","InOutMode","VerifyMode","WorkCode","CreateBy","CreateDate")
	SELECT t."TerminalId", t."PIN", t."AttDate", t."AttHourMinute",
t."AttTime", t."InOutMode", t."VerifyMode", t."WorkCode", '#TEMPORARY',
'2020-01-01 00:00:00'
	FROM (SELECT * FROM "cte" WHERE "RN" = 1) t
	WHERE NOT EXISTS (SELECT 1 FROM "IClock"."LOG_TEMP" WHERE
t."TerminalId"="TerminalId" AND t."PIN"="PIN" AND t."AttDate"="AttDate" AND
t."AttHourMinute"="AttHourMinute");
	
	DROP TABLE "#LOG_TEMP";

then got log message unrecognized win32 error code: 38

2019-12-14 09:12:49.377 +07 [12128] LOG:  unrecognized win32 error code:
38
2019-12-14 09:12:49.377 +07 [12128] STATEMENT:  CREATE TABLE "#LOG_TEMP"
	 (
	 "TerminalId" integer NOT NULL,
	 "PIN" character varying(20) COLLATE pg_catalog."default" NOT NULL,
	 "AttDate" date NOT NULL,
	 "AttHourMinute" time without time zone NOT NULL,
	 "AttTime" time without time zone NOT NULL,
	 "InOutMode" integer NOT NULL,
	 "VerifyMode" smallint NOT NULL,
	 "WorkCode" integer
	 );
	INSERT INTO
"#LOG_TEMP"("TerminalId","PIN","AttDate","AttHourMinute","AttTime","InOutMode","VerifyMode","WorkCode")
	VALUES(436,'203030029','2020-01-01','12:34:00','12:34:56',1,0,NULL),
	(436,'203030029','2020-01-01','13:34:00','13:34:56',1,0,NULL);
	
	WITH "cte" AS ( SELECT ROW_NUMBER() OVER(PARTITION BY "TerminalId", "PIN",
"AttDate", "AttHourMinute" ORDER BY "AttDate" DESC, "AttTime" DESC) AS
"RN",
	"TerminalId", "PIN", "AttDate", "AttHourMinute", "AttTime", "InOutMode",
"VerifyMode", "WorkCode" FROM "#LOG_TEMP" )
	INSERT INTO "IClock"."LOG_TEMP"("TerminalId",
"PIN","AttDate","AttHourMinute","AttTime","InOutMode","VerifyMode","WorkCode","CreateBy","CreateDate")
	SELECT t."TerminalId", t."PIN", t."AttDate", t."AttHourMinute",
t."AttTime", t."InOutMode", t."VerifyMode", t."WorkCode", '#TEMPORARY',
'2020-01-01 00:00:00'
	FROM (SELECT * FROM "cte" WHERE "RN" = 1) t
	WHERE NOT EXISTS (SELECT 1 FROM "IClock"."LOG_TEMP" WHERE
t."TerminalId"="TerminalId" AND t."PIN"="PIN" AND t."AttDate"="AttDate" AND
t."AttHourMinute"="AttHourMinute");
	
	
	DROP TABLE "#LOG_TEMP";

the query works fine, but why spam logs, LOG:  unrecognized win32 error
code: 38?

Messages

DateAuthorSubject
2019-12-14 03:44:37+00PG Bug reporting formBUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38
2019-12-14 08:40:19+00=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?=Re: BUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38