Re: [HACKERS] Assertion failure twophase.c (2) (testing HS/SR)

2010-03-12 Thread Simon Riggs
On Thu, 2010-03-11 at 11:29 +0200, Heikki Linnakangas wrote: I'm still not any wiser on what's causing that, but I've fixed the bug in KnownAssignedXidsMany() now. Yeh, I've been mulling this over for a few days now and I can't see a way that could have happened either. I agree with your fix

Re: [HACKERS] Server crash with older tzload library

2010-03-12 Thread Jeevan Chalke
Hi Tom, On Thu, Mar 11, 2010 at 8:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: Jeevan Chalke jeevan.cha...@enterprisedb.com writes: While setting timezone using SET command (say GMT+3:30), postgres sometimes crashes randomly. I can't reproduce that: regression=# SET TimeZone = 'GMT+3:30';

Re: [HACKERS] [patch] build issues on Win32

2010-03-12 Thread Dag-Erling Smørgrav
Tom Lane t...@sss.pgh.pa.us writes: Any such platform would already be contending with plpgsql not working, encoding conversion not working, etc etc. It's barely conceivable that a client-only installation would be useful. Uh, I don't understand why it's so hard to conceive that someone might

Re: [HACKERS] [patch] build issues on Win32

2010-03-12 Thread Magnus Hagander
2010/3/12 Dag-Erling Smørgrav d...@des.no: Tom Lane t...@sss.pgh.pa.us writes: Any such platform would already be contending with plpgsql not working, encoding conversion not working, etc etc.  It's barely conceivable that a client-only installation would be useful. Uh, I don't understand

Re: [HACKERS] walreceiver is uninterruptible on win32

2010-03-12 Thread Magnus Hagander
On Wed, Mar 10, 2010 at 10:09, Fujii Masao masao.fu...@gmail.com wrote: Hi, http://archives.postgresql.org/pgsql-hackers/2010-01/msg01672.php On win32, the blocking libpq functions like PQconnectdb() and PQexec() are uninterruptible since they use the vanilla select() instead of our signal

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Merlin Moncure
On Thu, Mar 11, 2010 at 11:24 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Merlin Moncure escribió: (small aside: the other biggie would be able to push a composite type in to an update statement...something like 'update foo set foo = new').  This is really great...some variant of

Re: [HACKERS] invalid UTF-8 via pl/perl

2010-03-12 Thread Hannu Krosing
On Mon, 2010-03-08 at 21:52 -0500, Andrew Dunstan wrote: Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: So SPI interface should also be fixed, either from perl side, or maybe from inside SPI ? SPI has every right to assume that data it's given is already in

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Tom Lane wrote: I was looking at this recent nonrepeatable buildfarm failure: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=polecatdt=2010-03-11%2021:45:10 Well, the good news is that we actually have the data on the server, in a temp file

Re: [HACKERS] invalid UTF-8 via pl/perl

2010-03-12 Thread Andrew Dunstan
Hannu Krosing wrote: On Mon, 2010-03-08 at 21:52 -0500, Andrew Dunstan wrote: Tom Lane wrote: Hannu Krosing ha...@2ndquadrant.com writes: So SPI interface should also be fixed, either from perl side, or maybe from inside SPI ? SPI has every right to assume

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Alvaro Herrera
Tom Lane wrote: Most of the pgstat wait timeout gripes are coming from the backend running the vacuum regression test, but there are two that came from process dcc0, which is shown by other log entries to be the autovacuum launcher. So now I'm wondering if there could be some issue that

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Andrew Dunstan
Tom Lane wrote: Now, the log_text field in our build_status_log table is text, so it's on insertion to the database that it gets truncated. I'm thinking that I should just escape nulls with a regex ( 's/\x00/\\0/g' or similar) before inserting the data. Works for me.

Re: [HACKERS] [BUGS] log : bad file dscriptor????

2010-03-12 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: It seems this commit never made it to the release notes. A customer came asking for the fix to this very problem, and although we know that the issue has been fixed, we could not refer him to the release notes. All we could suggest was to do the

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane wrote: Most of the pgstat wait timeout gripes are coming from the backend running the vacuum regression test, but there are two that came from process dcc0, which is shown by other log entries to be the autovacuum launcher. So now

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Andrew Dunstan
Robert Creager wrote: On Mar 11, 2010, at 6:00 PM, Andrew Dunstan wrote: Tom Lane wrote: I was looking at this recent nonrepeatable buildfarm failure: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=polecatdt=2010-03-11%2021:45:10 which has several instances of the known

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Tom Lane
Robert Creager rob...@logicalchaos.org writes: Is there any value in setting keep_error_builds = 0,? I know Andrew was able to get the complete log file. The data is all uploaded to the buildfarm server, so as long as EDB doesn't holler uncle about the amount of storage that's taking, I don't

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Andrew Dunstan
Tom Lane wrote: Robert Creager rob...@logicalchaos.org writes: Is there any value in setting keep_error_builds = 0,? I know Andrew was able to get the complete log file. The data is all uploaded to the buildfarm server, so as long as EDB doesn't holler uncle about the amount of

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread David Fetter
On Wed, Mar 10, 2010 at 07:50:16AM -0500, Andrew Dunstan wrote: hubert depesz lubaczewski wrote: On Tue, Mar 09, 2010 at 06:59:31PM +0100, Pavel Stehule wrote: 2010/3/9 strk s...@keybit.net: How can a pl/pgsql trigger change the values of dynamic fields in NEW record ? By dynamic I mean

Re: [HACKERS] Warning about invalid .pgpass passwords

2010-03-12 Thread Bruce Momjian
Andrew Dunstan wrote: Bruce Momjian wrote: + /* If it was 'invalid authorization', add .pgpass mention */ + if (conn-dot_pgpass_used conn-password_needed conn-result + /* only works with = 9.0 servers */ + strcmp(PQresultErrorField(conn-result,

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Robert Creager
On Mar 11, 2010, at 6:00 PM, Andrew Dunstan wrote: Tom Lane wrote: I was looking at this recent nonrepeatable buildfarm failure: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=polecatdt=2010-03-11%2021:45:10 which has several instances of the known pgstat wait timeout problem

Re: [HACKERS] [GENERAL] trouble with to_char('L')

2010-03-12 Thread Bruce Momjian
Takahiro Itagaki wrote: Bruce Momjian br...@momjian.us wrote: OK, I have created a new function, win32_wchar_to_db_encoding(), to share the conversion from wide characters to the database encoding. New patch attached. Since 9.0 has GetPlatformEncoding() for the purpose, we could

Re: [HACKERS] Reposnse from backend when wrong user/database request send

2010-03-12 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: It seems between 8.4 and CVS HEAD backend responses 'E' packet (error/fatal message) if a startup packet sent with wrong user and/or database. Before backend responses 'R' packet first followd by 'E' packet. Does anybody know why this change made?

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Pavel Stehule
2010/3/12 David Fetter da...@fetter.org: On Wed, Mar 10, 2010 at 07:50:16AM -0500, Andrew Dunstan wrote: hubert depesz lubaczewski wrote: On Tue, Mar 09, 2010 at 06:59:31PM +0100, Pavel Stehule wrote: 2010/3/9 strk s...@keybit.net: How can a pl/pgsql trigger change the values of dynamic

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread David Fetter
On Fri, Mar 12, 2010 at 07:35:41PM +0100, Pavel Stehule wrote: 2010/3/12 David Fetter da...@fetter.org: This is, by the way, an excellent argument for including hstore in core in 9.1. :) I like it - but it looking little bit strange - I thinking we need only one function (maybe with

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread strk
On Fri, Mar 12, 2010 at 10:47:45AM -0800, David Fetter wrote: On Fri, Mar 12, 2010 at 07:35:41PM +0100, Pavel Stehule wrote: 2010/3/12 David Fetter da...@fetter.org: This is, by the way, an excellent argument for including hstore in core in 9.1. :) I like it - but it looking

Re: [HACKERS] Server crash with older tzload library

2010-03-12 Thread Tom Lane
Jeevan Chalke jeevan.cha...@enterprisedb.com writes: In summary, following are the steps to re-produce: - Add above three lines at the beginning of the pg_tzset() function - make install - mv install/share/postgresql/timezone/posixrules install/share/postgresql/timezoneposixrules_a (or

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Pavel Stehule
2010/3/12 strk s...@keybit.net: On Fri, Mar 12, 2010 at 10:47:45AM -0800, David Fetter wrote: On Fri, Mar 12, 2010 at 07:35:41PM +0100, Pavel Stehule wrote: 2010/3/12 David Fetter da...@fetter.org: This is, by the way, an excellent argument for including hstore in core in 9.1. :)

Re: [HACKERS] Server crash with older tzload library

2010-03-12 Thread Tom Lane
Heikki Linnakangas heikki.linnakan...@enterprisedb.com writes: Tom Lane wrote: It strikes me that maybe we are putting ourselves at risk by blithely pushing tzdata updates into back branches without also pushing tzcode updates. I believe they're designed to be compatible both ways, I

Re: [HACKERS] Server crash with older tzload library

2010-03-12 Thread Tom Lane
I wrote: OK, I'm going to double-check that and then back-patch the current tzcode files. Oh, wait, belay that. If we do that, we will be retroactively breaking the no-working-64-bit-integer-type support in the older branches. Probably not a good thing to do in minor releases. I guess we'll

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Boszormenyi Zoltan
strk írta: On Fri, Mar 12, 2010 at 10:47:45AM -0800, David Fetter wrote: On Fri, Mar 12, 2010 at 07:35:41PM +0100, Pavel Stehule wrote: 2010/3/12 David Fetter da...@fetter.org: This is, by the way, an excellent argument for including hstore in core in 9.1. :) I

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Merlin Moncure
On Fri, Mar 12, 2010 at 3:01 PM, Boszormenyi Zoltan z...@cybertec.at wrote: What's wrong with UPDATE foo SET (foo) = (NEW); ? amen brother! :-) I say though, since you can do: SELECT foo FROM foo; why not UPDATE foo SET foo = new;? merlin -- Sent via pgsql-hackers mailing list

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Tom Lane
I wrote: Anyway it's only a guess. It could well be that that machine was simply so heavily loaded that the stats collector couldn't respond fast enough. I'm just wondering whether there's an unrecognized bug lurking here. Still meditating on this ... and it strikes me that the pgstat.c code

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Boszormenyi Zoltan
Merlin Moncure írta: On Fri, Mar 12, 2010 at 3:01 PM, Boszormenyi Zoltan z...@cybertec.at wrote: What's wrong with UPDATE foo SET (foo) = (NEW); ? amen brother! :-) I say though, since you can do: SELECT foo FROM foo; why not UPDATE foo SET foo = new;? I just tried this:

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Alvaro Herrera
Tom Lane wrote: I wrote: Anyway it's only a guess. It could well be that that machine was simply so heavily loaded that the stats collector couldn't respond fast enough. I'm just wondering whether there's an unrecognized bug lurking here. Still meditating on this ... and it strikes me

Re: [HACKERS] Reposnse from backend when wrong user/database request send

2010-03-12 Thread Tatsuo Ishii
Tatsuo Ishii is...@postgresql.org writes: It seems between 8.4 and CVS HEAD backend responses 'E' packet (error/fatal message) if a startup packet sent with wrong user and/or database. Before backend responses 'R' packet first followd by 'E' packet. Does anybody know why this change

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane wrote: Still meditating on this ... and it strikes me that the pgstat.c code is really uncommunicative about problems. In particular, pgstat_read_statsfile_timestamp and pgstat_read_statsfile don't complain at all about being unable

Re: [HACKERS] Reposnse from backend when wrong user/database request send

2010-03-12 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: Tatsuo Ishii is...@postgresql.org writes: It seems between 8.4 and CVS HEAD backend responses 'E' packet (error/fatal message) if a startup packet sent with wrong user and/or database. Before backend responses 'R' packet first followd by 'E' packet.

Re: [HACKERS] Dyamic updates of NEW with pl/pgsql

2010-03-12 Thread Robert Haas
On Fri, Mar 12, 2010 at 4:24 PM, Boszormenyi Zoltan z...@cybertec.at wrote: Merlin Moncure írta: On Fri, Mar 12, 2010 at 3:01 PM, Boszormenyi Zoltan z...@cybertec.at wrote: What's wrong with UPDATE foo SET (foo) = (NEW); ? amen brother! :-) I say though, since you can do: SELECT foo

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Alvaro Herrera
Tom Lane wrote: Alvaro Herrera alvhe...@commandprompt.com writes: I also think the autovacuum worker minimum timestamp may be playing games with the retry logic too. Maybe a worker is requesting a new file continuously because pgstat is not able to provide one before the deadline is

Re: [HACKERS] buildfarm logging versus embedded nulls

2010-03-12 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Since the warning comes from the launcher and not the worker, I wonder if this is a red herring. It's all speculation at the moment. So far there's not really enough evidence to refute the idea that the system was just under heavy load at that

Re: [HACKERS] Reposnse from backend when wrong user/database request send

2010-03-12 Thread Tatsuo Ishii
Tatsuo Ishii is...@postgresql.org writes: Tatsuo Ishii is...@postgresql.org writes: It seems between 8.4 and CVS HEAD backend responses 'E' packet (error/fatal message) if a startup packet sent with wrong user and/or database. Before backend responses 'R' packet first followd by 'E'

[HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Bruce Momjian
Teodor Sigaev wrote: Oleg, Teodor, can you look at this? I tried to fix it in wparser_def.c, but couldn't figure out how. Thanks. select distinct token as email from ts_parse('default', ' first_l...@yahoo.com ' ) where tokid = 4 Patch in attachment, it allows underscore in the

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Alvaro Herrera
Upon seeing this patch I considered that I use addresses such as alvherre+st...@something.org and wondered how could this thing support that. I don't think we want extra parser stuff just to add whatever random junk we want to support in email addresses ... -- Alvaro Herrera

Re: [HACKERS] renameatt() can rename attribute of index, sequence, ...

2010-03-12 Thread Robert Haas
2010/3/11 KaiGai Kohei kai...@ak.jp.nec.com: (2010/03/11 23:55), Robert Haas wrote: 2010/3/10 KaiGai Koheikai...@ak.jp.nec.com: Indeed, it is useful to allow renaming attribute of composite types. However, it is also useless to allow to rename attribute of sequences, but harmless, like

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Bruce Momjian
Alvaro Herrera wrote: Upon seeing this patch I considered that I use addresses such as alvherre+st...@something.org and wondered how could this thing support that. I don't think we want extra parser stuff just to add whatever random junk we want to support in email addresses ... Well, I

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Well, I think the big question is whether we need to honor RFC 5322 (http://www.rfc-editor.org/rfc/rfc5322.txt). Wikipedia says these are all valid characters: http://en.wikipedia.org/wiki/E-mail_address * Uppercase and lowercase English

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, I think the big question is whether we need to honor RFC 5322 (http://www.rfc-editor.org/rfc/rfc5322.txt). Wikipedia says these are all valid characters: http://en.wikipedia.org/wiki/E-mail_address * Uppercase and

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Steve Atkins
On Mar 12, 2010, at 5:18 PM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, I think the big question is whether we need to honor RFC 5322 (http://www.rfc-editor.org/rfc/rfc5322.txt). Wikipedia says these are all valid characters:

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: OK, I can add '+' using Teodor's patch as a guide, and document which characters we support, and that we don't support all of them. What about the binary upgrade issue? I am now worried that maybe we should back out the patch and just document our

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: OK, I can add '+' using Teodor's patch as a guide, and document which characters we support, and that we don't support all of them. What about the binary upgrade issue? I am now worried that maybe we should back out the patch and

Re: [HACKERS] Re: [BUGS] BUG #5021: ts_parse doesn't recognize email addresses with underscores

2010-03-12 Thread Bruce Momjian
Steve Atkins wrote: On Mar 12, 2010, at 5:18 PM, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Well, I think the big question is whether we need to honor RFC 5322 (http://www.rfc-editor.org/rfc/rfc5322.txt). Wikipedia says these are all valid characters:

[HACKERS] Getting to beta1

2010-03-12 Thread Bruce Momjian
Where are we in getting to beta1? I know people are looking to me for 9.0 release notes and I will have them done in about a week, but what about open issues? I don't see many on the main 9.0 open items page: http://wiki.postgresql.org/wiki/PostgreSQL_9.0_Open_Items#Bugs The list has

[HACKERS] pq_setkeepalives* functions

2010-03-12 Thread Jaime Casanova
Hi, In 2 of 3 pq_setkeepalives* functions we have the #DEFINE involving even this conditional: if (port == NULL || IS_AF_UNIX(port-laddr.addr.ss_family)) return STATUS_OK; but in pq_setkeepalivesinterval() the #DEFINE is after the conditional, doesn't seems to affect anything but