tcoq | 24 Apr 08:37 2014
Picon

LOG: incomplete message from client

Hi together,

I am batch-inserting a wide table with 50 columns via JAVA JDBC. (Postgres
9.2.8)

Sporadically I run into this error: (server)

LOG:  incomplete message from client

(client):

: 16:26:06,830  WARN taskExecutor-3 spi.SqlExceptionHelper:143 - SQL Error:
0, SQLState: 08006
: 16:26:06,831 ERROR taskExecutor-3 spi.SqlExceptionHelper:144 - An I/O
error occurred while sending to the .
: 16:26:06,834  WARN taskExecutor-3 impl.NewPooledConnection:486 - [c3p0] A
PooledConnection that has already signalled a Connection error is still in
use!
: 16:26:06,835  WARN taskExecutor-3 impl.NewPooledConnection:487 - [c3p0]
Another error has occurred [ org.postgresql.util.PSQLException: This
connection has been closed. ] which will not be reported to listeners!
org.postgresql.util.PSQLException: This connection has been closed.
	at
org.postgresql.jdbc2.AbstractJdbc2Connection.checkClosed(AbstractJdbc2Connection.java:837)
	at
org.postgresql.jdbc2.AbstractJdbc2Connection.getAutoCommit(AbstractJdbc2Connection.java:798)
	at
com.mchange.v2.c3p0.impl.NewProxyConnection.getAutoCommit(NewProxyConnection.java:985)
	at
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.isAutoCommit(LogicalConnectionImpl.java:392)
(Continue reading)

Moshe Jacobson | 24 Apr 17:14 2014

Foreign key constraint not enforced??

I’m not sure what is going on here. I feel like I’m missing something obvious. Seems like a bug, so I’m posting on -bugs.

Please see the transcript below:

postgres <at> moshe=>isesdb:apache=# \d tb_error_log_event Table "public.tb_error_log_event" Column | Type | Modifiers ----------------------+-----------------------------+----------------------------------------------------- error_log_event | bigint | not null default nextval('sq_pk_error_log_event'::r. | |.egclass) created | timestamp without time zone | not null default now() logged | timestamp without time zone | not null message_placeholders | integer[] | error_log_message | bigint | not null client_ip | inet | not null server | integer | not null domain | integer | not null log_level | integer | not null Indexes: "tb_error_log_event_pkey" PRIMARY KEY, btree (error_log_event) Foreign-key constraints: "tb_error_log_event_domain_fkey" FOREIGN KEY (domain) REFERENCES tb_domain(domain) "tb_error_log_event_error_log_message_fkey" FOREIGN KEY (error_log_message) REFERENCES tb_error_log_message(error_log_message) "tb_error_log_event_log_level_fkey" FOREIGN KEY (log_level) REFERENCES tb_log_level(log_level) "tb_error_log_event_server_fkey" FOREIGN KEY (server) REFERENCES tb_server(server) Number of child tables: 1 (Use \d+ to list them.) postgres <at> moshe=>isesdb:apache=# select error_log_event, error_log_message from tb_error_log_event; error_log_event | error_log_message -----------------+------------------- 17 | 5 18 | 6 (2 rows) Time: 0.853 ms postgres <at> moshe=>isesdb:apache=# select * from tb_error_log_message; error_log_message | message_body -------------------+-------------------------------------------------------------------------------------- 6 | test error log message ? ? ? ? ? ?-lalala , referer: http://ises.robert.neadwerx.co. |.m/reports/reports.php (1 row) Time: 0.782 ms postgres <at> moshe=>isesdb:apache=#

Surprisingly, I was able to pg_dump and pg_restore the database, and the inconsistency remained!

Fortunately, also, I am able to share the pg_dump. You can download it here:

Binary dump: https://dl.dropboxusercontent.com/u/12192123/apache.pg_dump
Text dump: https://dl.dropboxusercontent.com/u/12192123/apache.pg_dump.sql

Thanks for any insight.

Moshe Jacobson
Manager of Systems Engineering, Nead Werx Inc.
2323 Cumberland Parkway · Suite 201 · Atlanta, GA 30339

“Quality is not an act, it is a habit.” — Aristotle

maxim.boguk | 24 Apr 12:18 2014
Picon

BUG #10123: Weird entries in pg_stat_activity

The following bug has been logged on the website:

Bug reference:      10123
Logged by:          Maxim Boguk
Email address:      maxim.boguk <at> gmail.com
PostgreSQL version: 9.2.8
Operating system:   Linux
Description:        

Hi everyone,

During debug of the weird nagios database alerts about long transactions I
found that sometime pg_stat_activity contains very weird entries with
xact_start NOT NULL and state='idle'... what's more they happened during
backend idle state.

To check what's going on I performed the following actions on production
database:
1)set log_min_duration_statement=0 to see ALL database queries
2)run single line bash script to check for weird entries:
while true; do  psql -x -X -c "select now() as ts,now()-xact_start as
tx_age, now()-state_change as change_age,* from pg_stat_activity where
state='idle' and xact_start is not null" |  grep -vE '^$|No rows'; sleep
0.1; done

And yes, once-twice-trice per minute script output some interesting results
such as:

-[ RECORD 1
]----+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ts               | 2014-04-24 13:49:03.498354+04
tx_age           | 00:04:01.283106
change_age       | 00:04:01.279373
datid            | 16385
datname          | *******
pid              | 685
usesysid         | 16384
usename          | *******
application_name |
client_addr      | 127.0.0.1
client_hostname  |
client_port      | 37461
backend_start    | 2014-04-24 13:30:03.275711+04
xact_start       | 2014-04-24 13:45:02.215248+04
query_start      | 2014-04-24 13:45:02.215248+04
state_change     | 2014-04-24 13:45:02.218981+04
waiting          | f
state            | idle
query            |
                 |                     SELECT cache.save_response(
                 |                      *****
                 |                     );

State=idle
xact_start=4 min ago

Now what I found in the full database log for this pid:

...

2014-04-24 13:45:02 MSK 685 **** <at> **** from 127.0.0.1 [vxid:24/0 txid:0]
[SELECT] LOG:  duration: 3.703 ms  statement:
                            SELECT cache.save_response(...)

-- no queries between 13:45 and 13:50 at all!

2014-04-24 13:50:01 MSK 685 **** <at> **** from 127.0.0.1 [vxid:24/0 txid:0]
[SELECT] LOG:  duration: 0.962 ms  statement: select 1
2014-04-24 13:50:01 MSK 685 **** <at> **** from 127.0.0.1 [vxid:24/0 txid:0]
[SELECT] LOG:  duration: 0.415 ms  statement: SELECT * FROM o_queries_queue
...

So it seems that sometime pg_stat_activity entry become alive with the old
information (it shows xact_start from the last executed query in backend,
even if that query finished long time ago).
I know about asynchronous behavior of pg_stat_activity but getting
xact_start from deep past seems wrong for me.

What's more: i tested that problem on another databases - and found they
have same effect (so it doesn't look like a problem local to that single
exact database).

Kind Regards,
Maksym

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Claudio Nieder | 24 Apr 11:54 2014
Picon

Possible transaction bug with isolation level serialisable?

Hi,

Two concurrent transaction first check if a certain value is listed in a table and if not try to insert it. As
the value inserted hasto be unique and both try to enter the same one, one transaction fails reporting that
the value is already part of the table. As both are executed within a transaction with isolation level
SERIALIZABLE I would have expected that one of them would return with a serialization failure, which my
program would have been ready to handle and re-execute the transaction.

The reason I think something is fishy is, because I find the behaviour is somehow similar to a nonrepeatable
read which should not occur with this transaction level. The 

SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)

reports, that the value is NOT in the table, thus the program then tries to insert it, and at that point the
value is shown as being in the table.

So is this a bug, or did I misunderstand something?

This is with version 9.3.4 of PostgreSQL.

$ psql --version; postgres --version; uname -a
psql (PostgreSQL) 9.3.4
postgres (PostgreSQL) 9.3.4
Darwin Claudios-MacBook-Pro.local 13.1.0 Darwin Kernel Version 13.1.0: Wed Apr  2 23:52:02 PDT 2014;
root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64

Here all the lines from the log file concerning the two transactions. 

2014-04-23 23:58:48 CEST [63576]: [1-1] user=[unknown],db=[unknown] LOG:  connection received:
host=127.0.0.1 port=62251
2014-04-23 23:58:48 CEST [63584]: [1-1] user=[unknown],db=[unknown] LOG:  connection received:
host=127.0.0.1 port=62259
2014-04-23 23:58:48 CEST [63584]: [2-1] user=reslist,db=reslist LOG:  connection authorized:
user=reslist database=reslist
2014-04-23 23:58:48 CEST [63584]: [3-1] user=reslist,db=reslist LOG:  duration: 0.210 ms  parse
<unnamed>: SET extra_float_digits = 3
2014-04-23 23:58:48 CEST [63584]: [4-1] user=reslist,db=reslist LOG:  duration: 0.021 ms  bind
<unnamed>: SET extra_float_digits = 3
2014-04-23 23:58:48 CEST [63584]: [5-1] user=reslist,db=reslist LOG:  duration: 0.012 ms  execute
<unnamed>: SET extra_float_digits = 3
2014-04-23 23:58:48 CEST [63576]: [2-1] user=reslist,db=reslist LOG:  connection authorized:
user=reslist database=reslist
2014-04-23 23:58:48 CEST [63584]: [6-1] user=reslist,db=reslist LOG:  duration: 0.051 ms  parse
<unnamed>: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
2014-04-23 23:58:48 CEST [63584]: [7-1] user=reslist,db=reslist LOG:  duration: 0.007 ms  bind
<unnamed>: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
2014-04-23 23:58:48 CEST [63584]: [8-1] user=reslist,db=reslist LOG:  duration: 0.009 ms  execute
<unnamed>: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
2014-04-23 23:58:48 CEST [63584]: [9-1] user=reslist,db=reslist LOG:  duration: 0.025 ms  parse
<unnamed>: BEGIN
2014-04-23 23:58:48 CEST [63584]: [10-1] user=reslist,db=reslist LOG:  duration: 0.005 ms  bind
<unnamed>: BEGIN
2014-04-23 23:58:48 CEST [63584]: [11-1] user=reslist,db=reslist LOG:  duration: 0.006 ms  execute
<unnamed>: BEGIN
2014-04-23 23:58:48 CEST [63584]: [12-1] user=reslist,db=reslist LOG:  duration: 1.370 ms  parse
<unnamed>: SELECT "id" FROM "User" WHERE "nick"=$1 AND "deleted" IS NULL
2014-04-23 23:58:48 CEST [63576]: [3-1] user=reslist,db=reslist LOG:  duration: 0.224 ms  parse
<unnamed>: SET extra_float_digits = 3
2014-04-23 23:58:48 CEST [63576]: [4-1] user=reslist,db=reslist LOG:  duration: 0.024 ms  bind
<unnamed>: SET extra_float_digits = 3
2014-04-23 23:58:48 CEST [63576]: [5-1] user=reslist,db=reslist LOG:  duration: 0.015 ms  execute
<unnamed>: SET extra_float_digits = 3
2014-04-23 23:58:48 CEST [63576]: [6-1] user=reslist,db=reslist LOG:  duration: 0.037 ms  parse
<unnamed>: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
2014-04-23 23:58:48 CEST [63576]: [7-1] user=reslist,db=reslist LOG:  duration: 0.006 ms  bind
<unnamed>: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
2014-04-23 23:58:48 CEST [63576]: [8-1] user=reslist,db=reslist LOG:  duration: 0.009 ms  execute
<unnamed>: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
2014-04-23 23:58:48 CEST [63584]: [13-1] user=reslist,db=reslist LOG:  duration: 0.684 ms  bind
<unnamed>: SELECT "id" FROM "User" WHERE "nick"=$1 AND "deleted" IS NULL
2014-04-23 23:58:48 CEST [63584]: [14-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen'
2014-04-23 23:58:48 CEST [63584]: [15-1] user=reslist,db=reslist LOG:  duration: 0.024 ms  execute
<unnamed>: SELECT "id" FROM "User" WHERE "nick"=$1 AND "deleted" IS NULL
2014-04-23 23:58:48 CEST [63584]: [16-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen'
2014-04-23 23:58:48 CEST [63576]: [9-1] user=reslist,db=reslist LOG:  duration: 0.026 ms  parse
<unnamed>: BEGIN
2014-04-23 23:58:48 CEST [63576]: [10-1] user=reslist,db=reslist LOG:  duration: 0.005 ms  bind
<unnamed>: BEGIN
2014-04-23 23:58:48 CEST [63576]: [11-1] user=reslist,db=reslist LOG:  duration: 0.007 ms  execute
<unnamed>: BEGIN
2014-04-23 23:58:48 CEST [63584]: [17-1] user=reslist,db=reslist LOG:  duration: 0.227 ms  parse
<unnamed>: SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63584]: [18-1] user=reslist,db=reslist LOG:  duration: 0.265 ms  bind
<unnamed>: SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63584]: [19-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63584]: [20-1] user=reslist,db=reslist LOG:  duration: 0.014 ms  execute
<unnamed>: SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63584]: [21-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63584]: [22-1] user=reslist,db=reslist LOG:  duration: 0.258 ms  parse
<unnamed>: SELECT
"User"."id","User"."nick","User"."address","User"."givenname","User"."surname","User"."email","User"."newmailNotification","User"."realnameVisible","User"."language","User"."last_login","User"."creationTime","User"."deleted","Host"."name","Service"."name","User"."password","User"."salt"
FROM "User" INNER JOIN "Host" ON "User"."hostRef"="Host"."id" INNER JOIN "Service" ON
"Host"."serviceRef"="Service"."id" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [12-1] user=reslist,db=reslist LOG:  duration: 1.241 ms  parse
<unnamed>: SELECT "id" FROM "User" WHERE "nick"=$1 AND "deleted" IS NULL
2014-04-23 23:58:48 CEST [63584]: [23-1] user=reslist,db=reslist LOG:  duration: 0.434 ms  bind
<unnamed>: SELECT
"User"."id","User"."nick","User"."address","User"."givenname","User"."surname","User"."email","User"."newmailNotification","User"."realnameVisible","User"."language","User"."last_login","User"."creationTime","User"."deleted","Host"."name","Service"."name","User"."password","User"."salt"
FROM "User" INNER JOIN "Host" ON "User"."hostRef"="Host"."id" INNER JOIN "Service" ON
"Host"."serviceRef"="Service"."id" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63584]: [24-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63584]: [25-1] user=reslist,db=reslist LOG:  duration: 0.015 ms  execute
<unnamed>: SELECT
"User"."id","User"."nick","User"."address","User"."givenname","User"."surname","User"."email","User"."newmailNotification","User"."realnameVisible","User"."language","User"."last_login","User"."creationTime","User"."deleted","Host"."name","Service"."name","User"."password","User"."salt"
FROM "User" INNER JOIN "Host" ON "User"."hostRef"="Host"."id" INNER JOIN "Service" ON
"Host"."serviceRef"="Service"."id" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63584]: [26-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63584]: [27-1] user=reslist,db=reslist LOG:  duration: 0.046 ms  parse
<unnamed>: SELECT "id" FROM "Host" WHERE "name"=$1
2014-04-23 23:58:48 CEST [63584]: [28-1] user=reslist,db=reslist LOG:  duration: 0.082 ms  bind
<unnamed>: SELECT "id" FROM "Host" WHERE "name"=$1
2014-04-23 23:58:48 CEST [63584]: [29-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'localhost'
2014-04-23 23:58:48 CEST [63584]: [30-1] user=reslist,db=reslist LOG:  duration: 0.026 ms  execute
<unnamed>: SELECT "id" FROM "Host" WHERE "name"=$1
2014-04-23 23:58:48 CEST [63584]: [31-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'localhost'
2014-04-23 23:58:48 CEST [63576]: [13-1] user=reslist,db=reslist LOG:  duration: 0.639 ms  bind
<unnamed>: SELECT "id" FROM "User" WHERE "nick"=$1 AND "deleted" IS NULL
2014-04-23 23:58:48 CEST [63576]: [14-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen'
2014-04-23 23:58:48 CEST [63576]: [15-1] user=reslist,db=reslist LOG:  duration: 0.022 ms  execute
<unnamed>: SELECT "id" FROM "User" WHERE "nick"=$1 AND "deleted" IS NULL
2014-04-23 23:58:48 CEST [63576]: [16-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen'
2014-04-23 23:58:48 CEST [63576]: [17-1] user=reslist,db=reslist LOG:  duration: 0.208 ms  parse
<unnamed>: SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [18-1] user=reslist,db=reslist LOG:  duration: 0.247 ms  bind
<unnamed>: SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [19-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63576]: [20-1] user=reslist,db=reslist LOG:  duration: 0.014 ms  execute
<unnamed>: SELECT "userRef" FROM "VerifyQueue" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [21-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63576]: [22-1] user=reslist,db=reslist LOG:  duration: 0.345 ms  parse
<unnamed>: SELECT
"User"."id","User"."nick","User"."address","User"."givenname","User"."surname","User"."email","User"."newmailNotification","User"."realnameVisible","User"."language","User"."last_login","User"."creationTime","User"."deleted","Host"."name","Service"."name","User"."password","User"."salt"
FROM "User" INNER JOIN "Host" ON "User"."hostRef"="Host"."id" INNER JOIN "Service" ON
"Host"."serviceRef"="Service"."id" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [23-1] user=reslist,db=reslist LOG:  duration: 0.581 ms  bind
<unnamed>: SELECT
"User"."id","User"."nick","User"."address","User"."givenname","User"."surname","User"."email","User"."newmailNotification","User"."realnameVisible","User"."language","User"."last_login","User"."creationTime","User"."deleted","Host"."name","Service"."name","User"."password","User"."salt"
FROM "User" INNER JOIN "Host" ON "User"."hostRef"="Host"."id" INNER JOIN "Service" ON
"Host"."serviceRef"="Service"."id" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [24-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63576]: [25-1] user=reslist,db=reslist LOG:  duration: 0.019 ms  execute
<unnamed>: SELECT
"User"."id","User"."nick","User"."address","User"."givenname","User"."surname","User"."email","User"."newmailNotification","User"."realnameVisible","User"."language","User"."last_login","User"."creationTime","User"."deleted","Host"."name","Service"."name","User"."password","User"."salt"
FROM "User" INNER JOIN "Host" ON "User"."hostRef"="Host"."id" INNER JOIN "Service" ON
"Host"."serviceRef"="Service"."id" WHERE lower("email")=lower($1)
2014-04-23 23:58:48 CEST [63576]: [26-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'silberbatzen <at> gmail.com'
2014-04-23 23:58:48 CEST [63576]: [27-1] user=reslist,db=reslist LOG:  duration: 0.046 ms  parse
<unnamed>: SELECT "id" FROM "Host" WHERE "name"=$1
2014-04-23 23:58:48 CEST [63576]: [28-1] user=reslist,db=reslist LOG:  duration: 0.075 ms  bind
<unnamed>: SELECT "id" FROM "Host" WHERE "name"=$1
2014-04-23 23:58:48 CEST [63576]: [29-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'localhost'
2014-04-23 23:58:48 CEST [63576]: [30-1] user=reslist,db=reslist LOG:  duration: 0.021 ms  execute
<unnamed>: SELECT "id" FROM "Host" WHERE "name"=$1
2014-04-23 23:58:48 CEST [63576]: [31-1] user=reslist,db=reslist DETAIL:  parameters: $1 = 'localhost'
2014-04-23 23:58:48 CEST [63584]: [32-1] user=reslist,db=reslist LOG:  duration: 0.226 ms  parse
<unnamed>: INSERT INTO
"User"("nick","password","salt","address","givenname","surname","email","newmailNotification","realnameVisible","pictureVisible","language","hostRef","creationTime","agb")
VALUES ($1,$2,$3,$4,$5,$6,NULL,$7,$8,$9,$10,$11,$12,$13)
2014-04-23 23:58:48 CEST [63584]: [33-1] user=reslist,db=reslist LOG:  duration: 0.136 ms  bind
<unnamed>: INSERT INTO
"User"("nick","password","salt","address","givenname","surname","email","newmailNotification","realnameVisible","pictureVisible","language","hostRef","creationTime","agb")
VALUES ($1,$2,$3,$4,$5,$6,NULL,$7,$8,$9,$10,$11,$12,$13)
2014-04-23 23:58:48 CEST [63584]: [34-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen', $2 = 'HBfkwJDphdr+YDB2Yp7bwC8oci7JSWkOhtn2JFGRcTo=', $3 = 'ogrUEWQCi/k=', $4 =
'Technical', $5 = 'Testuser', $6 = 'Silver', $7 = 'f', $8 = 'f', $9 = 'f', $10 = 'de', $11 = '4', $12 =
'1398290328', $13 = '8ZEwvtmABppOjChHuxnGo34EJLgejz/cF4OT+y7W6F8='
2014-04-23 23:58:48 CEST [63576]: [32-1] user=reslist,db=reslist LOG:  duration: 0.164 ms  parse
<unnamed>: INSERT INTO
"User"("nick","password","salt","address","givenname","surname","email","newmailNotification","realnameVisible","pictureVisible","language","hostRef","creationTime","agb")
VALUES ($1,$2,$3,$4,$5,$6,NULL,$7,$8,$9,$10,$11,$12,$13)
2014-04-23 23:58:48 CEST [63576]: [33-1] user=reslist,db=reslist LOG:  duration: 0.152 ms  bind
<unnamed>: INSERT INTO
"User"("nick","password","salt","address","givenname","surname","email","newmailNotification","realnameVisible","pictureVisible","language","hostRef","creationTime","agb")
VALUES ($1,$2,$3,$4,$5,$6,NULL,$7,$8,$9,$10,$11,$12,$13)
2014-04-23 23:58:48 CEST [63576]: [34-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen', $2 = 'PqhzQDLRd8cNKef2idIhyoNE3/cOPgGomB93PoWhhHM=', $3 = 'rsJG2GZudz8=', $4 =
'Technical', $5 = 'Testuser', $6 = 'Silver', $7 = 'f', $8 = 'f', $9 = 'f', $10 = 'de', $11 = '4', $12 =
'1398290328', $13 = '8ZEwvtmABppOjChHuxnGo34EJLgejz/cF4OT+y7W6F8='
2014-04-23 23:58:48 CEST [63584]: [35-1] user=reslist,db=reslist LOG:  duration: 4.444 ms  execute
<unnamed>: INSERT INTO
"User"("nick","password","salt","address","givenname","surname","email","newmailNotification","realnameVisible","pictureVisible","language","hostRef","creationTime","agb")
VALUES ($1,$2,$3,$4,$5,$6,NULL,$7,$8,$9,$10,$11,$12,$13)
2014-04-23 23:58:48 CEST [63584]: [36-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen', $2 = 'HBfkwJDphdr+YDB2Yp7bwC8oci7JSWkOhtn2JFGRcTo=', $3 = 'ogrUEWQCi/k=', $4 =
'Technical', $5 = 'Testuser', $6 = 'Silver', $7 = 'f', $8 = 'f', $9 = 'f', $10 = 'de', $11 = '4', $12 =
'1398290328', $13 = '8ZEwvtmABppOjChHuxnGo34EJLgejz/cF4OT+y7W6F8='
2014-04-23 23:58:48 CEST [63584]: [37-1] user=reslist,db=reslist LOG:  duration: 0.096 ms  parse
<unnamed>: SELECT currval('"userSeq"')
2014-04-23 23:58:48 CEST [63584]: [38-1] user=reslist,db=reslist LOG:  duration: 0.027 ms  bind
<unnamed>: SELECT currval('"userSeq"')
2014-04-23 23:58:48 CEST [63584]: [39-1] user=reslist,db=reslist LOG:  duration: 0.096 ms  execute
<unnamed>: SELECT currval('"userSeq"')
2014-04-23 23:58:48 CEST [63576]: [35-1] user=reslist,db=reslist LOG:  duration: 4.431 ms  execute
<unnamed>: INSERT INTO
"User"("nick","password","salt","address","givenname","surname","email","newmailNotification","realnameVisible","pictureVisible","language","hostRef","creationTime","agb")
VALUES ($1,$2,$3,$4,$5,$6,NULL,$7,$8,$9,$10,$11,$12,$13)
2014-04-23 23:58:48 CEST [63576]: [36-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen', $2 = 'PqhzQDLRd8cNKef2idIhyoNE3/cOPgGomB93PoWhhHM=', $3 = 'rsJG2GZudz8=', $4 =
'Technical', $5 = 'Testuser', $6 = 'Silver', $7 = 'f', $8 = 'f', $9 = 'f', $10 = 'de', $11 = '4', $12 =
'1398290328', $13 = '8ZEwvtmABppOjChHuxnGo34EJLgejz/cF4OT+y7W6F8='
2014-04-23 23:58:48 CEST [63576]: [37-1] user=reslist,db=reslist LOG:  duration: 0.080 ms  parse
<unnamed>: SELECT currval('"userSeq"')
2014-04-23 23:58:48 CEST [63576]: [38-1] user=reslist,db=reslist LOG:  duration: 0.032 ms  bind
<unnamed>: SELECT currval('"userSeq"')
2014-04-23 23:58:48 CEST [63576]: [39-1] user=reslist,db=reslist LOG:  duration: 0.043 ms  execute
<unnamed>: SELECT currval('"userSeq"')
2014-04-23 23:58:48 CEST [63584]: [40-1] user=reslist,db=reslist LOG:  duration: 0.112 ms  parse
<unnamed>: SELECT "groupRef" FROM "InviteQueue" WHERE "token"=$1
2014-04-23 23:58:48 CEST [63576]: [40-1] user=reslist,db=reslist LOG:  duration: 0.126 ms  parse
<unnamed>: SELECT "groupRef" FROM "InviteQueue" WHERE "token"=$1
2014-04-23 23:58:48 CEST [63584]: [41-1] user=reslist,db=reslist LOG:  duration: 0.159 ms  bind
<unnamed>: SELECT "groupRef" FROM "InviteQueue" WHERE "token"=$1
2014-04-23 23:58:48 CEST [63584]: [42-1] user=reslist,db=reslist DETAIL:  parameters: $1 = NULL
2014-04-23 23:58:48 CEST [63584]: [43-1] user=reslist,db=reslist LOG:  duration: 0.003 ms  execute
<unnamed>: SELECT "groupRef" FROM "InviteQueue" WHERE "token"=$1
2014-04-23 23:58:48 CEST [63584]: [44-1] user=reslist,db=reslist DETAIL:  parameters: $1 = NULL
2014-04-23 23:58:48 CEST [63576]: [41-1] user=reslist,db=reslist LOG:  duration: 0.166 ms  bind
<unnamed>: SELECT "groupRef" FROM "InviteQueue" WHERE "token"=$1
2014-04-23 23:58:48 CEST [63576]: [42-1] user=reslist,db=reslist DETAIL:  parameters: $1 = NULL
2014-04-23 23:58:48 CEST [63576]: [43-1] user=reslist,db=reslist LOG:  duration: 0.004 ms  execute
<unnamed>: SELECT "groupRef" FROM "InviteQueue" WHERE "token"=$1
2014-04-23 23:58:48 CEST [63576]: [44-1] user=reslist,db=reslist DETAIL:  parameters: $1 = NULL
2014-04-23 23:58:48 CEST [63584]: [45-1] user=reslist,db=reslist LOG:  duration: 0.041 ms  parse
<unnamed>: INSERT INTO "VerifyQueue"("email","token","userRef","groupRef","creationTime")
VALUES ($1,$2,$3,$4,$5)
2014-04-23 23:58:48 CEST [63584]: [46-1] user=reslist,db=reslist LOG:  duration: 0.041 ms  bind
<unnamed>: INSERT INTO "VerifyQueue"("email","token","userRef","groupRef","creationTime")
VALUES ($1,$2,$3,$4,$5)
2014-04-23 23:58:48 CEST [63584]: [47-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen <at> gmail.com', $2 = 'fg8t3iG30eTfQyVPb79yhw.html', $3 = '1', $4 = NULL, $5 = '1398290328'
2014-04-23 23:58:48 CEST [63576]: [45-1] user=reslist,db=reslist LOG:  duration: 0.054 ms  parse
<unnamed>: INSERT INTO "VerifyQueue"("email","token","userRef","groupRef","creationTime")
VALUES ($1,$2,$3,$4,$5)
2014-04-23 23:58:48 CEST [63576]: [46-1] user=reslist,db=reslist LOG:  duration: 0.100 ms  bind
<unnamed>: INSERT INTO "VerifyQueue"("email","token","userRef","groupRef","creationTime")
VALUES ($1,$2,$3,$4,$5)
2014-04-23 23:58:48 CEST [63576]: [47-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen <at> gmail.com', $2 = 'aF6n8wyzaQ0pBipusp3wg.html', $3 = '2', $4 = NULL, $5 = '1398290328'
2014-04-23 23:58:48 CEST [63584]: [48-1] user=reslist,db=reslist LOG:  duration: 2.576 ms  execute
<unnamed>: INSERT INTO "VerifyQueue"("email","token","userRef","groupRef","creationTime")
VALUES ($1,$2,$3,$4,$5)
2014-04-23 23:58:48 CEST [63584]: [49-1] user=reslist,db=reslist DETAIL:  parameters: $1 =
'silberbatzen <at> gmail.com', $2 = 'fg8t3iG30eTfQyVPb79yhw.html', $3 = '1', $4 = NULL, $5 = '1398290328'
2014-04-23 23:58:48 CEST [63584]: [50-1] user=reslist,db=reslist LOG:  duration: 0.051 ms  parse
<unnamed>: SELECT "Service"."name" FROM "Service" INNER JOIN "Host" ON
"Host"."serviceRef"="Service"."id" WHERE "Host"."id"=$1
2014-04-23 23:58:48 CEST [63584]: [51-1] user=reslist,db=reslist LOG:  duration: 0.117 ms  bind
<unnamed>: SELECT "Service"."name" FROM "Service" INNER JOIN "Host" ON
"Host"."serviceRef"="Service"."id" WHERE "Host"."id"=$1
2014-04-23 23:58:48 CEST [63584]: [52-1] user=reslist,db=reslist DETAIL:  parameters: $1 = '4'
2014-04-23 23:58:48 CEST [63584]: [53-1] user=reslist,db=reslist LOG:  duration: 0.049 ms  execute
<unnamed>: SELECT "Service"."name" FROM "Service" INNER JOIN "Host" ON
"Host"."serviceRef"="Service"."id" WHERE "Host"."id"=$1
2014-04-23 23:58:48 CEST [63584]: [54-1] user=reslist,db=reslist DETAIL:  parameters: $1 = '4'
2014-04-23 23:58:48 CEST [63584]: [55-1] user=reslist,db=reslist LOG:  duration: 0.021 ms  parse S_1: COMMIT
2014-04-23 23:58:48 CEST [63584]: [56-1] user=reslist,db=reslist LOG:  duration: 0.013 ms  bind S_1: COMMIT
2014-04-23 23:58:48 CEST [63584]: [57-1] user=reslist,db=reslist LOG:  duration: 0.226 ms  execute S_1: COMMIT
2014-04-23 23:58:48 CEST [63576]: [48-1] user=reslist,db=reslist ERROR:  duplicate key value violates
unique constraint "QueueLowerEmailIdx"
2014-04-23 23:58:48 CEST [63576]: [49-1] user=reslist,db=reslist DETAIL:  Key
(lower(email::text))=(silberbatzen <at> gmail.com) already exists.
2014-04-23 23:58:48 CEST [63576]: [50-1] user=reslist,db=reslist STATEMENT:  INSERT INTO
"VerifyQueue"("email","token","userRef","groupRef","creationTime") VALUES ($1,$2,$3,$4,$5)
2014-04-23 23:58:48 CEST [63584]: [58-1] user=reslist,db=reslist LOG:  disconnection: session time:
0:00:00.023 user=reslist database=reslist host=127.0.0.1 port=62259
2014-04-23 23:58:48 CEST [63576]: [51-1] user=reslist,db=reslist LOG:  duration: 0.036 ms  parse S_1: ROLLBACK
2014-04-23 23:58:48 CEST [63576]: [52-1] user=reslist,db=reslist LOG:  duration: 0.010 ms  bind S_1: ROLLBACK
2014-04-23 23:58:48 CEST [63576]: [53-1] user=reslist,db=reslist LOG:  duration: 0.011 ms  execute S_1: ROLLBACK
2014-04-23 23:58:48 CEST [63576]: [54-1] user=reslist,db=reslist LOG:  disconnection: session time:
0:00:00.044 user=reslist database=reslist host=127.0.0.1 port=62251

claudio
-- 
Claudio Nieder  .  mailto:claudio.nieder <at> inodes.ch  .  http://inodes.ch/
iNodes AG  .  Loogartenstrasse 14  .  CH-8048 Z├╝rich  .  +41 43 960 0066

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Michael Paquier | 24 Apr 07:54 2014
Picon

Missing file versions for a bunch of dll/exe files in Windows builds

Hi all,

A colleague of mine pointed out that the file version is missing in a
couple of dll and exe files when building on windows using the
community scripts in src/tools/msvc. After having a closer look, I
noticed that a *lot* of files are missing the shot:
- all the exe/dll in contrib/
- dll of PL languages (perl, python, tcl, pgsql)
- libpqwalreceiver, snowball
- ecpg stuff
- regression and isolation test stuff
- conversion_procs thingies
Having a version number associated to a build is important for all
companies creating builds of Postgres on Windows, so it would be good
to have the patch attached applied and back-patched.

Regards,
-- 
Michael
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 308a4b4..08fdc14 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
 <at>  <at>  -103,7 +103,7  <at>  <at>  sub mkvcbuild
 		'src\backend\port\win32_shmem.c');
 	$postgres->ReplaceFile('src\backend\port\pg_latch.c',
 		'src\backend\port\win32_latch.c');
-	$postgres->AddFiles('src\port',    <at> pgportfiles);
+	$postgres->AddFiles('src\port',  <at> pgportfiles);
 	$postgres->AddFiles('src\common',  <at> pgcommonbkndfiles);
 	$postgres->AddDir('src\timezone');
 	$postgres->AddFiles('src\backend\parser', 'scan.l', 'gram.y');
 <at>  <at>  -128,11 +128,13  <at>  <at>  sub mkvcbuild
 		});
 	$snowball->AddIncludeDir('src\include\snowball');
 	$snowball->AddReference($postgres);
+	$snowball->AddResourceFile('src\backend\snowball', 'snowball');

 	my $plpgsql =
 	  $solution->AddProject('plpgsql', 'dll', 'PLs', 'src\pl\plpgsql\src');
 	$plpgsql->AddFiles('src\pl\plpgsql\src', 'pl_gram.y');
 	$plpgsql->AddReference($postgres);
+	$plpgsql->AddResourceFile('src\pl\plpgsql\src', 'plpgsql');

 	if ($solution->{options}->{perl})
 	{
 <at>  <at>  -206,6 +208,7  <at>  <at>  sub mkvcbuild
 			}
 		}
 		$plperl->AddReference($postgres);
+		$plperl->AddResourceFile('src\pl\plperl', 'plperl');
 		my  <at> perl_libs =
 		  grep { /perl\d+.lib$/ }
 		  glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib');
 <at>  <at>  -245,6 +248,7  <at>  <at>  sub mkvcbuild
 		$plpython->AddIncludeDir($pyprefix . '\include');
 		$plpython->AddLibrary($pyprefix . "\\Libs\\python$pyver.lib");
 		$plpython->AddReference($postgres);
+		$plpython->AddResourceFile('src\pl\plpython', 'plpython');
 	}

 	if ($solution->{options}->{tcl})
 <at>  <at>  -253,6 +257,7  <at>  <at>  sub mkvcbuild
 		  $solution->AddProject('pltcl', 'dll', 'PLs', 'src\pl\tcl');
 		$pltcl->AddIncludeDir($solution->{options}->{tcl} . '\include');
 		$pltcl->AddReference($postgres);
+		$pltcl->AddResourceFile('src\pl\tcl', 'pltcl');
 		if (-e $solution->{options}->{tcl} . '\lib\tcl85.lib')
 		{
 			$pltcl->AddLibrary(
 <at>  <at>  -284,6 +289,8  <at>  <at>  sub mkvcbuild
 		'src\backend\replication\libpqwalreceiver');
 	$libpqwalreceiver->AddIncludeDir('src\interfaces\libpq');
 	$libpqwalreceiver->AddReference($postgres, $libpq);
+	$libpqwalreceiver->AddResourceFile('src\backend\replication\libpqwalreceiver',
+					   'libpqwalreceiver');

 	my $pgtypes = $solution->AddProject(
 		'libpgtypes', 'dll',
 <at>  <at>  -292,6 +299,8  <at>  <at>  sub mkvcbuild
 	$pgtypes->AddReference($libpgport);
 	$pgtypes->UseDef('src\interfaces\ecpg\pgtypeslib\pgtypeslib.def');
 	$pgtypes->AddIncludeDir('src\interfaces\ecpg\include');
+	$pgtypes->AddResourceFile('src\interfaces\ecpg\pgtypeslib',
+				  'libpgtypes');

 	my $libecpg = $solution->AddProject('libecpg', 'dll', 'interfaces',
 		'src\interfaces\ecpg\ecpglib');
 <at>  <at>  -302,6 +311,8  <at>  <at>  sub mkvcbuild
 	$libecpg->UseDef('src\interfaces\ecpg\ecpglib\ecpglib.def');
 	$libecpg->AddLibrary('wsock32.lib');
 	$libecpg->AddReference($libpq, $pgtypes, $libpgport);
+	$libecpg->AddResourceFile('src\interfaces\ecpg\ecpglib',
+				  'libecpg');

 	my $libecpgcompat = $solution->AddProject(
 		'libecpg_compat', 'dll',
 <at>  <at>  -310,6 +321,8  <at>  <at>  sub mkvcbuild
 	$libecpgcompat->AddIncludeDir('src\interfaces\libpq');
 	$libecpgcompat->UseDef('src\interfaces\ecpg\compatlib\compatlib.def');
 	$libecpgcompat->AddReference($pgtypes, $libecpg, $libpgport);
+	$libecpgcompat->AddResourceFile('src\interfaces\ecpg\compatlib',
+				  'libecpg_compat');

 	my $ecpg = $solution->AddProject('ecpg', 'exe', 'interfaces',
 		'src\interfaces\ecpg\preproc');
 <at>  <at>  -332,6 +345,8  <at>  <at>  sub mkvcbuild
 	$pgregress_ecpg->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
 	$pgregress_ecpg->AddDefine('FRONTEND');
 	$pgregress_ecpg->AddReference($libpgcommon, $libpgport);
+	$pgregress_ecpg->AddResourceFile('src\interfaces\ecpg\test',
+					'pg_regress_ecpg');

 	my $isolation_tester =
 	  $solution->AddProject('isolationtester', 'exe', 'misc');
 <at>  <at>  -347,6 +362,8  <at>  <at>  sub mkvcbuild
 	$isolation_tester->AddDefine('FRONTEND');
 	$isolation_tester->AddLibrary('wsock32.lib');
 	$isolation_tester->AddReference($libpq, $libpgcommon, $libpgport);
+	$isolation_tester->AddResourceFile('src\test\isolation',
+					   'isolation');

 	my $pgregress_isolation =
 	  $solution->AddProject('pg_isolation_regress', 'exe', 'misc');
 <at>  <at>  -435,6 +452,7  <at>  <at>  sub mkvcbuild
 	$zic->AddFiles('src\timezone', 'zic.c', 'ialloc.c', 'scheck.c',
 		'localtime.c');
 	$zic->AddReference($libpgcommon, $libpgport);
+	$zic->AddResourceFile('src\timezone', 'zic');

 	if ($solution->{options}->{xml})
 	{
 <at>  <at>  -501,6 +519,7  <at>  <at>  sub mkvcbuild
 	}
 	$pgcrypto->AddReference($postgres);
 	$pgcrypto->AddLibrary('wsock32.lib');
+	$pgcrypto->AddResourceFile('contrib\pgcrypto', 'pgcrypto');
 	my $mf = Project::read_file('contrib/pgcrypto/Makefile');
 	GenerateContribSqlFiles('pgcrypto', $mf);

 <at>  <at>  -535,6 +554,7  <at>  <at>  sub mkvcbuild
 				'src\backend\utils\mb\conversion_procs\\' . $sub . '\\' . $1);
 		}
 		$p->AddReference($postgres);
+		$p->AddResourceFile('src\backend\utils\mb\conversion_procs\\' . $sub, $sub);
 	}

 	$mf = Project::read_file('src\bin\scripts\Makefile');
 <at>  <at>  -590,12 +610,13  <at>  <at>  sub mkvcbuild
 	$pgregress->AddIncludeDir('src\port');
 	$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
 	$pgregress->AddReference($libpgcommon, $libpgport);
+	$pgregress->AddResourceFile('src\test\regress', 'pg_regress');

 	# fix up pg_xlogdump once it's been set up
 	# files symlinked on Unix are copied on windows
 	my $pg_xlogdump =
 	  (grep { $_->{name} eq 'pg_xlogdump' }
-		   <at> { $solution->{projects}->{contrib} })[0];
+		 <at> { $solution->{projects}->{contrib} })[0];
 	$pg_xlogdump->AddDefine('FRONTEND');
 	foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c'))
 	{
 <at>  <at>  -603,9 +624,8  <at>  <at>  sub mkvcbuild
 		copy($xf, "contrib/pg_xlogdump/$bf");
 		$pg_xlogdump->AddFile("contrib\\pg_xlogdump\\$bf");
 	}
-	copy(
-		'src/backend/access/transam/xlogreader.c',
-		'contrib/pg_xlogdump/xlogreader.c');
+	copy('src/backend/access/transam/xlogreader.c',
+		 'contrib/pg_xlogdump/xlogreader.c');

 	$solution->Save();
 	return $solution->{vcver};
 <at>  <at>  -672,6 +692,7  <at>  <at>  sub AddContrib
 				}
 			}
 		}
+		AddContribResourceFile($proj, $mf, 'contrib\\' . $n, $dn);
 		AdjustContribProj($proj);
 	}
 	elsif ($mf =~ /^MODULES\s*=\s*(.*)$/mg)
 <at>  <at>  -681,12 +702,14  <at>  <at>  sub AddContrib
 			my $proj = $solution->AddProject($mod, 'dll', 'contrib');
 			$proj->AddFile('contrib\\' . $n . '\\' . $mod . '.c');
 			$proj->AddReference($postgres);
+			AddContribResourceFile($proj, $mf, 'contrib\\' . $n, $mod);
 			AdjustContribProj($proj);
 		}
 	}
 	elsif ($mf =~ /^PROGRAM\s*=\s*(.*)$/mg)
 	{
-		my $proj = $solution->AddProject($1, 'exe', 'contrib');
+		my $dn = $1;
+		my $proj = $solution->AddProject($dn, 'exe', 'contrib');
 		$mf =~ s{\\\s*[\r\n]+}{}mg;
 		$mf =~ /^OBJS\s*=\s*(.*)$/gm
 		  || croak "Could not find objects in PROGRAM for $n\n";
 <at>  <at>  -697,6 +720,7  <at>  <at>  sub AddContrib
 			$o =~ s/\.o$/.c/;
 			$proj->AddFile('contrib\\' . $n . '\\' . $o);
 		}
+		AddContribResourceFile($proj, $mf, 'contrib\\' . $n, $dn);
 		AdjustContribProj($proj);
 	}
 	else
 <at>  <at>  -708,6 +732,29  <at>  <at>  sub AddContrib
 	GenerateContribSqlFiles($n, $mf);
 }

+sub AddContribResourceFile
+{
+	my $proj = shift;
+	my $mf = shift;
+	my $dir = shift;
+	my $name = shift;
+
+	# See if this contrib Makefile contains a description and then
+	# generate its resource file. If no explicit file description is
+	# given use the module name.
+	if ($mf =~ /^PGFILEDESC\s*=\s*\"([^\"]+)\"/m)
+	{
+		my $desc = $1;
+		my $ico;
+		if ($mf =~ /^PGAPPICON\s*=\s*(.*)$/m) { $ico = $1; }
+		$proj->AddResourceFile($dir, $desc, $ico);
+	}
+	else
+	{
+		$proj->AddResourceFile($dir, $name);
+	}
+}
+
 sub GenerateContribSqlFiles
 {
 	my $n  = shift;

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
mike | 24 Apr 01:01 2014

BUG #10122: proargtypes and proallargtypes are inconsistent for pg_identify_object

The following bug has been logged on the website:

Bug reference:      10122
Logged by:          Michael Trinque
Email address:      mike <at> aquameta.com
PostgreSQL version: 9.3.4
Operating system:   Ubuntu 14.04
Description:        

pg_identify_object's second parameter is listed as an integer in
proallargtypes. It should be 26 (oid).

Steps to reproduce:
select proargtypes, proallargtypes from pg_proc where proname =
'pg_identify_object';

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Andres Freund | 24 Apr 02:22 2014

mismatching proargtypes/proallargtypes (bug #10122)

Hi,

'trinque' on irc reported that "SELECT pg_catalog.pg_identify_object(oid,
integer, integer)'::regprocedure" doesn't work and Andrew Gierth noticed
it's because proargtypes doesn't match proallargtypes.

Surpringsly there's no regression check testing for that. I recall
running into problems with mismatches there myself in the past. The
attached patch fixes the two wrong cases and adds a regression test to
prevent further occurances.
The broken functions are:
 oid  |                 oid                 | proargtypes |     proallargtypes     | filtered_allargtypes |   proargmodes   
------+-------------------------------------+-------------+------------------------+----------------------+-----------------
 3078 | pg_sequence_parameters(oid)         | {26}        | {23,20,20,20,20,16}    | {23}                 | {i,o,o,o,o,o}
 3839 | pg_identify_object(oid,oid,integer) | {26,26,23}  | {26,23,23,25,25,25,25} | {26,23,23}           | {i,i,i,o,o,o,o}

sequence_parameters is wrong in 9.1+, identify_object in 9.3+.

Luckily neither is particularly important. It's really a pity that we
don't have infrastructure for fixing this like this :/.

Do we need a note in the release notes for fixing those functions?

I am sending this as a separate thread as the actual bugreport is
still stuck in moderation and I going to bed. Don't want somebody to
waste their time duplicating this.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
John R Pierce | 23 Apr 23:09 2014

Re: BUG #10116: Unable to load more than 100 recs - trial version

On 4/23/2014 1:59 PM, Babar Mashkoor wrote:
> Thanks for response, can you please suggest why data is loading slow 
> on redshift
> I am using SSIS 2012, and copying data from sql server 2012 to Amazon 
> redshift
>

Redshift may be based on PostgreSQL, but it is NOT stock PostgreSQL.    
You might ask Amazon support for help with their implementation.

I don't know what SSIS 2012 is, Google suggests its a Microsoft 
product?  We can't help you with that, either.

Anyways, nothing here resembles a 'bug' in PostgerSQL, the pgsql-bugs 
system is the wrong place to discuss this.

-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

bmashkoor | 23 Apr 21:48 2014

BUG #10116: Unable to load more than 100 recs - trial version

The following bug has been logged on the website:

Bug reference:      10116
Logged by:          Babar Mashkoor
Email address:      bmashkoor <at> joc.com
PostgreSQL version: 9.3.4
Operating system:   Windows 2007
Description:        

I am unable to load more than 100 rows in trial version
Is there any possibility i can load more records for performance testing and
before making final decision

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

eshkinkot | 23 Apr 02:15 2014
Picon

BUG #10112: Timezone abbrevs and it history

The following bug has been logged on the website:

Bug reference:      10112
Logged by:          Sergey Burladyan
Email address:      eshkinkot <at> gmail.com
PostgreSQL version: 9.3.4
Operating system:   Debian testing
Description:        

May be this is correct today, because there is no DST in Russia today:
select * from pg_timezone_abbrevs where abbrev in ('MSK', 'MSD');
 abbrev | utc_offset | is_dst 
--------+------------+--------
 MSD    | 04:00:00   | t
 MSK    | 04:00:00   | f

but, for example, in 2009 it must be different, I think
zdump -v Europe/Moscow | grep 2009
Europe/Moscow  Sat Mar 28 22:59:59 2009 UTC = Sun Mar 29 01:59:59 2009 MSK
isdst=0 gmtoff=10800
Europe/Moscow  Sat Mar 28 23:00:00 2009 UTC = Sun Mar 29 03:00:00 2009 MSD
isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 24 22:59:59 2009 UTC = Sun Oct 25 02:59:59 2009 MSD
isdst=1 gmtoff=14400
Europe/Moscow  Sat Oct 24 23:00:00 2009 UTC = Sun Oct 25 02:00:00 2009 MSK
isdst=0 gmtoff=10800

and 'Oct 25 02:15 MSD' (Oct 24 22:15:00 UTC) must not be equal to 'Oct 25
02:15 MSK' (Oct 24 23:15:00 UTC)
but now it is equal:
select 'Sun Oct 25 02:15:00 2009 MSD'::timestamptz = 'Sun Oct 25 02:15:00
2009 MSK'::timestamptz;
 ?column? 
----------
 t

not sure, is this a bug or feature...

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

lukecoldiron | 21 Apr 22:08 2014
Picon

BUG #10095: primary key corruption

The following bug has been logged on the website:

Bug reference:      10095
Logged by:          Luke Coldiron
Email address:      lukecoldiron <at> hotmail.com
PostgreSQL version: 9.3.3
Operating system:   Ubuntu Linux 12.04 &quot;Precise Pangolin&quot; 32bit
Description:        

I am seeing a problem where different primary keys in my database are being
corrupted.

ERROR:  could not read block 0 in file "base/16407/41243": read only 0 of
8192 bytes

When I look on the filesystem the "base/16407/41243" file is zero bytes.
When I lookup the object name that is currupt via select relname from
pg_class where relfilenode = 41243; it is always a primary key and not
always on the same table.

The system was previously upgraded from pg 8.3.7 and these issues did not
occur.

I haven't tried upgrading to 9.3.4 since it didn't look like any of the bug
fixes where targeted at the issue I am seeing.

Unfortunately, I have not yet be able to create a reproducible test case or
find a log where the issue first appeared. Any ideas would be much
appreciated.

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Gmane