pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38
2+ messages / 2 participants
[nested] [flat]

* BUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38
@ 2019-12-14 03:44  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2019-12-14 03:44 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: kadib001@gmail.com

The following bug has been logged on the website:

Bug reference:      16165
Logged by:          Sasuke Vita
Email address:      kadib001@gmail.com
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?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38
@ 2019-12-14 08:40  Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Juan José Santamaría Flecha @ 2019-12-14 08:40 UTC (permalink / raw)
  To: kadib001@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

>
> the query works fine, but why spam logs, LOG:  unrecognized win32 error
> code: 38?
>
>
Thanks for reporting. This issue has already been addressed in commit
6969dee:

https://github.com/postgres/postgres/commit/6969deeb8d3991cc533a5bcf451ae5eecaa9a517


Regards,

Juan José Santamaría Flecha

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-12-14 08:40 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-14 03:44 BUG #16165: Query Works fine but spam so many LOG: unrecognized win32 error code: 38 PG Bug reporting form <noreply@postgresql.org>
2019-12-14 08:40 ` Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox