[BUGS] BUG #5217: (new) error with VB 6.0 SP 6 and psqlODBC 8.4.1
The following bug has been logged online: Bug reference: 5217 Logged by: Martin Email address: searepo...@aol.at PostgreSQL version: 8.4.1 Operating system: M$ Vista (but does not matter) same on XP, ... Description:(new) error with VB 6.0 SP 6 and psqlODBC 8.4.1 Details: works fine with psqlODBC 8.3.4, error with psqlODBC 8.4.1 Sp.CursorType = adOpenDynamic Sp.Open "SELECT field1, False :: boolean as Field2 from test LIMIT 1;", PGSQL_Connection Sp!Field2 = "1" ' < error I can send mylog_3804.log and psqlodbc_3804.log, if someone is interested. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #2673: run-time error '429'
The following bug has been logged online: Bug reference: 2673 Logged by: Martin Email address: [EMAIL PROTECTED] PostgreSQL version: Sebastian Operating system: windows 98 Description:run-time error '429' Details: run-time error '4'29' Ativex component can't create objct Como lo puedo solucionar eso?? Este cartel me lo pone cuando estoy intentando entrar en un juego llamado mu la paguina del juego es www.powermju.no-ip.org por favor si me pueden ayudar se lo agradeceria muchisimo. Desde ya muchas gracias y espero q me puedan ayudar!! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[BUGS] BUG #2396: SELECT to_number('6500', '999,999.99') != 650
The following bug has been logged online: Bug reference: 2396 Logged by: Martin Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.3 Operating system: Win XP SP 2 German Description:SELECT to_number('6500', '999,999.99') != 650 Details: 1.) I have found some mails from Nov 2004 concerning the same problem with to_number, so is it sitll not solved or not a bug? SELECT to_number('6500', '999,999,999.99'), to_number('6500', '9.99'), to_number('6500', '99.999,99'), to_number('6500', 'FM999,999.99'); => 650 !! 6500 6500 6500 7.3.6 SuSe 8.0 8.1.3 Debian 8.1.3 Win XP 2.) I cant find this feature/bug in the doc's or in postgresql-8.1.3\src\test\regress\sql\numeric.sql. Is there a bug-list? Thank you for your efforts! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[BUGS] Incorrect cursor behaviour with gist index
Hi, I'm using PostgreSQL 8.3.1 with PostGIS 1.3.3. I have the following table: CREATE TABLE fog_4752 ( description text, gid integer NOT NULL, item_class text, item_id integer, origin_x double precision, origin_y double precision, origin_z double precision, geometry geometry, CONSTRAINT enforce_dims_geometry CHECK ((ndims(geometry) = 2)), CONSTRAINT enforce_srid_geometry CHECK ((srid(geometry) = 27700)) ); INSERT INTO fog_4752 (description, gid, item_class, item_id, origin_x, origin_y, origin_z, geometry) VALUES ('Polygon', 6, 'Polygon', 6, 270463.5995574299, 660527.33722885954, 0, '010320346C0100050042098568C0E014411917774DA44F26419475BFC6784608411917774DA44F26419475BFC678460841936EDB0B1901224142098568C0E01441936EDB0B1901224142098568C0E014411917774DA44F2641'); INSERT INTO fog_4752 (description, gid, item_class, item_id, origin_x, origin_y, origin_z, geometry) VALUES ('Polygon', 4, 'Polygon', 4, 306782.6950348168, 112627.83974142233, 0, '010320346C01000500288A4FB70C430741E06CA5E47060F240EAA4C6336FD11941E06CA5E47060F240EAA4C6336FD1194130FD41FD044F0241288A4FB70C43074130FD41FD044F0241288A4FB70C430741E06CA5E47060F240'); INSERT INTO fog_4752 (description, gid, item_class, item_id, origin_x, origin_y, origin_z, geometry) VALUES ('Polygon', 5, 'Polygon', 5, 224805.30810014351, 415632.86486705049, 0, '010320346C01000500A0BDB7907EBA04415A4590094F4612417256A12EEB1311415A4590094F4612417256A12EEB1311419892D7F01B3B2041A0BDB7907EBA04419892D7F01B3B2041A0BDB7907EBA04415A4590094F461241'); INSERT INTO fog_4752 (description, gid, item_class, item_id, origin_x, origin_y, origin_z, geometry) VALUES ('Polygon', 1, 'Polygon', 1, 317159.57945692743, 809954.47290725145, 0, '010320346C0100050018E0648798E71641E6B7DC1478FF2A415CE0AA36489F0F41E6B7DC1478FF2A415CE0AA36489F0F41861465CF1170264118E0648798E71641861465CF1170264118E0648798E71641E6B7DC1478FF2A41'); INSERT INTO fog_4752 (description, gid, item_class, item_id, origin_x, origin_y, origin_z, geometry) VALUES ('Polygon', 2, 'Polygon', 2, 457247.5191554199, 527703.21662584448, 0, '010320346C01000500B50BF40E7B642041475B545A4EF4224186DD520906081741475B545A4EF4224186DD5209060817411E9EFD061D821A41B50BF40E7B6420411E9EFD061D821A41B50BF40E7B642041475B545A4EF42241'); INSERT INTO fog_4752 (description, gid, item_class, item_id, origin_x, origin_y, origin_z, geometry) VALUES ('Polygon', 3, 'Polygon', 3, 567242.49402979179, 197718.29200272885, 0, '010320346C010005003FCF4C7C885E23415E698CEE51801041BA452CFB42811E415E698CEE51801041BA452CFB42811E41E075E49D8189FE403FCF4C7C885E2341E075E49D8189FE403FCF4C7C885E23415E698CEE51801041'); ALTER TABLE ONLY fog_4752 ADD CONSTRAINT fog_4752_pkey PRIMARY KEY (gid); CREATE INDEX fog_4752_geometry_sidx ON fog_4752 USING gist (geometry); Now I'm running these SQL commands: SET ENABLE_SEQSCAN = OFF; BEGIN; DECLARE C63 SCROLL CURSOR FOR select * from fog_4752 where (geometry && setsrid('BOX(111697.268 85647.94,655446.012 679205.729)'::box2d,27700) and intersects(geometry,'SRID=27700;POLYGON((655446.011617731 679205.729188659,111697.267899139 679205.729188659,111697.267899139 85647.940243935,655446.011617731 85647.940243935,655446.011617731 679205.729188659))'::geometry)); FETCH ABSOLUTE -1 IN C63; FETCH ABSOLUTE 1 IN C63; FETCH FORWARD 10 IN C63; FETCH ABSOLUTE -1 IN C63; CLOSE C63; END; The query used to create the cursor selects 5 of the 6 rows in the table. The problem is this: The "FETCH ABSOLUTE -1 IN C63" commands return zero rows, when clearly they should return one row, namely the last row in the cursor. As far as I understand, the ENABLE_SEQSCAN = OFF forces the query to use the gist index, which would otherwise not be used. However, if the cursor would select a suitably sized subset of a large enough table, then the gist index would be used regardless of the setting of ENABLE_SEQSCAN. So simply setting ENABLE_SEQSCAN = ON is not a solution that will work in all cases. To me this seems to be a bug in PostgreSQL. If it is, can it be fixed? Regards, Martin Schäfer Principal Software Engineer Cadcorp Computer Aided Development Corporation Ltd. 1 Heathcock Court, London, WC2R 0NT [EMAIL PROTECTED] www.cadcorp.com -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] Problem with the pg_dumpall file format
Guys, I apologise for sending a bug report this way, but the bug reporting server seems to be out to lunch at present. Firefox reports being able to contact it but its bug submission wasn't accepted. To avoid loss of the bug report, here it is: Name: Martin Gregorie e-mail: [EMAIL PROTECTED] Postgres: 8.2.10 OS: Linux (Fedora 9) Details: For some reason, when my message table (see below) is dumped, blank lines are introduced between rows. Each row contains the contents of each field. There isn't anything obvious in the final bytea field that might cause this problem. There are longer rows than the one preceding the blank line. The blank lines cause the restore to crash with the message: psql:cluster.sql:146200: ERROR: invalid input syntax for integer: "" CONTEXT: COPY message, line 3, column sdbk: "" The table definition is: create table message ( sdbkint primary key, date_sent timestamp, subject int references subject(sdbk), searchtext text, headers bytea, multipart boolean, content bytea ); If you need data samples, please ask. Best regards, Martin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] Fall back to alternative tsearch dictionary directory
Hello all, as recently mentioned on pg-general@, I am currently working on making installed myspell/unspell dictionary packages (which install themselves in /usr/share/myspell/dicts, mostly LATIN encoded) available to PostgreSQL's tsearch/word stemming in Debian/Ubuntu. So far I wrote the postgresql-common infrastructure to mangle these dictionary/affix files to become palatable for PostgreSQL (recoding to UTF-8, renaming to lowercase, changing file suffix) and install them into /var/cache/postgresql/dicts/ whenever a {hun,my}spell-* package is installed or updated. The remaining bit is teaching postgresql to actually look into /var/cache/postgresql/dicts/ if it does not find a matching dictionary/affix file in ${sharepath}/tsearch_data/. The reasons why I'm not using ${sharepath}/tsearch_data/ in the first place are that - it's autogenerated data, as opposed to files statically shipped in a package - I do not want to conflict to/overwrite files which the admin manually put there. I created an initial demo patch which provides this fallback. It works great, it passes my test cases (which set up tsearch full text search and stemming handling) and is pretty simple, too. However, the path is hardcoded so far, which is of course bad for upstream inclusion. So this should either become a ./configure option --with-tsearch-dict-fallback=path (or similar), or even a new optional configuration parameter for postgresql.conf. However, before I work on that, I'd like to collect some opinions about the general idea, and whether you prefer autoconf option or postgresql.conf, or whether you wouldn't accept it at all? Thanks a lot in advance! Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) # Description: If a tsearch/stem dictionary is not found in /usr/share/postgresql/VERSION/tsearch_data/, fall back to /var/cache/postgresql/dicts/, where postgresql-common creates them from system directories. # Ubuntu: https://launchpad.net/bugs/301770 --- ./src/backend/tsearch/ts_utils.c.orig 2008-12-01 06:47:28.0 -0800 +++ ./src/backend/tsearch/ts_utils.c 2008-12-01 07:05:14.0 -0800 @@ -15,6 +15,7 @@ #include "postgres.h" #include +#include #include "miscadmin.h" #include "tsearch/ts_locale.h" @@ -36,7 +37,7 @@ const char *extension) { char sharepath[MAXPGPATH]; - char *result; + char *result, *system_result; /* * We limit the basename to contain a-z, 0-9, and underscores. This may @@ -58,6 +59,21 @@ snprintf(result, MAXPGPATH, "%s/tsearch_data/%s.%s", sharepath, basename, extension); + /* fall back to /var/cache/postgresql/dicts/ */ + if (access(result, R_OK) != 0) + { + system_result = palloc(MAXPGPATH); + snprintf(system_result, MAXPGPATH, "/var/cache/postgresql/dicts/%s.%s", + basename, extension); + if (access(system_result, R_OK) == 0) + { + pfree(result); + result = system_result; + } + else + pfree(system_result); + } + return result; } signature.asc Description: Digital signature
Re: [BUGS] Fall back to alternative tsearch dictionary directory
Hi Tom, Tom Lane [2008-12-01 19:51 -0500]: > I can't see any reason whatever to not put them into > ${sharepath}/tsearch_data/. It's not like you're expecting to be > able to share them with other applications. No, not for sharing. I just don't like them to be in /usr, but that's by and large a stylistic preference, and I won't dwell on it. > Seems like it'd be quite sufficient to choose a specialized naming > policy within tsearch_data, say es_ES.aff -> system_es_es.aff. Works for me, too. > I don't think moving stuff into a different subdirectory makes > conflicts a non-problem; it just means that half the world will be > unhappy with the search order you chose. IMHO there is really just one sensible ordering here. Always prefer the ones installed by hand, and only if they are not present, fall back to the system defaults. The other way around would mean that the admin couldn't do local overriding any more. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] Fall back to alternative tsearch dictionary directory
Tom Lane [2008-12-01 19:51 -0500]: > I can't see any reason whatever to not put them into > ${sharepath}/tsearch_data/. It's not like you're expecting to be > able to share them with other applications. Oh, forgot yesterday, there is one case: the data can be shared between the 8.3, 8.4, and any future version. (In Debian/Ubuntu you can install different 8.x versions in parallel) But that can easily be achieved in the distro packaging by adding symlinks, so if you prefer just looking for ${sharedir}/tsearch_data/system_ll_cc.affix, that would still work for me. Thanks! Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] Fall back to alternative tsearch dictionary directory
Martin Pitt [2008-12-02 5:29 -0800]: > Tom Lane [2008-12-01 19:51 -0500]: > > I can't see any reason whatever to not put them into > > ${sharepath}/tsearch_data/. It's not like you're expecting to be > > able to share them with other applications. > > Oh, forgot yesterday, there is one case: the data can be shared > between the 8.3, 8.4, and any future version. (In Debian/Ubuntu you > can install different 8.x versions in parallel) > > But that can easily be achieved in the distro packaging by adding > symlinks, so if you prefer just looking for > ${sharedir}/tsearch_data/system_ll_cc.affix, that would still work for > me. Right, so I changed the patch accordingly. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) # Description: If a tsearch/stem dictionary is not found in sharedir/tsearch_data/ll_cc.{dict,affix}, fall back to sharedir/tsearch_data/system_ll_cc.{dict,affix}, where postgresql-common creates them from system directories. # Ubuntu: https://launchpad.net/bugs/301770 diff -Nur -x '*.orig' -x '*~' postgresql-8.3/build-tree/postgresql-8.3.5/src/backend/tsearch/ts_utils.c postgresql-8.3.new/build-tree/postgresql-8.3.5/src/backend/tsearch/ts_utils.c --- postgresql-8.3.5/src/backend/tsearch/ts_utils.c 2008-06-19 09:52:31.0 -0700 +++ postgresql-8.3.5/src/backend/tsearch/ts_utils.c 2008-12-05 12:48:02.0 -0800 @@ -15,6 +15,7 @@ #include "postgres.h" #include +#include #include "miscadmin.h" #include "tsearch/ts_locale.h" @@ -36,7 +37,7 @@ const char *extension) { char sharepath[MAXPGPATH]; - char *result; + char *result, *system_result; /* * We limit the basename to contain a-z, 0-9, and underscores. This may @@ -58,6 +59,21 @@ snprintf(result, MAXPGPATH, "%s/tsearch_data/%s.%s", sharepath, basename, extension); + /* fall back to a system-supplied one */ + if (access(result, R_OK) != 0) + { + system_result = palloc(MAXPGPATH); + snprintf(system_result, MAXPGPATH, "%s/tsearch_data/system_%s.%s", + sharepath, basename, extension); + if (access(system_result, R_OK) == 0) + { + pfree(result); + result = system_result; + } + else + pfree(system_result); + } + return result; } signature.asc Description: Digital signature
[BUGS] Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
Hello PostgreSQL developers, first, happy new year to you all! I recently got this bug report through Debian. I can confirm that on an otherwise idle system, and with no connections to PostgreSQL at all, I get 8,5% ( 11,5) postgres : schedule_hrtimeout_range (hrtimer_wakeup) in powertop. Now, 11 wakeups per minute is not dramatic, and with PostgreSQL being a server application, perfect power management is certainly the least concern for you. However, it would be interesting to know whether those wakeups are intended and necessary, or if they would be easy or hard to fix. (I have no problem with closing the bug as wontfix, but I'd like to give a rationale). Thank you! Martin - Forwarded message from Xavier Bestel - Subject: Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second) Reply-To: Xavier Bestel , 506...@bugs.debian.org From: Xavier Bestel To: Debian Bug Tracking System Date: Wed, 19 Nov 2008 10:12:05 +0100 Package: postgresql Version: 8.3.5-1 Severity: minor Hi, postgresql is installed on my machine because it was pulled by another package (can't remember which one). It doesn't do anything special, but it still does more then 10 wakeups/second on that system, uselessly. If idle, it shouldn't even appear in powertop's profile. Thanks, Xav - End forwarded message - -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
Hi Alvaro, Alvaro Herrera [2009-01-04 18:05 -0300]: > How many databases are there? It's a freshly created instance, thus just "template[01]" and "postgres". Standard 8.3 autovacuum is enabled. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: Bug#506196: [BUGS] Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
Hi Simon, Simon Riggs [2009-01-05 12:13 +]: > Seems consistent with wal_writer_delay = 200ms and bgwriter_delay = > 200ms, plus some other minor noise. Ah, thanks. > So its not a "bug" and won't get "fixed". Right, it's not a bug in the sense of "does not behave as intended". Purely a wishlist thingy. Thanks for your investigations, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: Bug#506196: [BUGS] Debian Bug#506196: postgresql: consume too much power when idle (>10 wakeups/second)
Hi Simon, Simon Riggs [2009-01-05 10:57 +]: > Is this 11 per minute, or 11 per second? Per second. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] Fall back to alternative tsearch dictionary directory
Hi Tom, Tom Lane [2009-01-14 20:56 -0500]: > Bruce Momjian writes: > > Uh, would someone eyeball and apply this? Thanks. > > I thought we had come to the conclusion that no patch was needed > because there's no convincing reason to look anyplace except > ${sharepath}/tsearch_data/. That's what the current patch does now: It falls back to system_basename.extension if there is no basename.extension. This avoids overwriting the admin's own installed dictionaries with automatically generated ones, and allows telling apart the ones that the system can update automatically (system_) from the ones that we should not touch (without system_ prefix). Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #4629: PL/pgSQL issue
The following bug has been logged online: Bug reference: 4629 Logged by: Martin Blazek Email address: mbla...@8bc.com PostgreSQL version: 8.3.5 Operating system: Windows XP Description:PL/pgSQL issue Details: I try to create the following rule. It doesn't make much sense, but the syntax is ok and if the table "test" exists, it is created. CREATE RULE "rule" AS ON INSERT TO "test" DO INSTEAD INSERT INTO "test" VALUES (1); The next step is creating a function that contains only the following command: CREATE FUNCTION test() RETURNS integer AS $$ BEGIN CREATE RULE "rule" AS ON INSERT TO "test" DO INSTEAD INSERT INTO "test" VALUES (1); END;$$ LANGUAGE plpgsql; Wow! Here's the result (already on function create, not during runtime): ERROR: syntax error at ""test"" DETAIL: Expected record variable, row variable, or list of scalar variables following INTO. KONTEXT: compile of PL/pgSQL function "test" near line 2 It appears that only insert rules have this issue - update and delete work as expected. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #4724: Array index out of bounds
The following bug has been logged online: Bug reference: 4724 Logged by: Ett Martin Email address: ettl.mar...@gmx.de PostgreSQL version: 8.3.7 Operating system: Linux Description:Array index out of bounds Details: I have checked the sources with a static code analysis tool cppcheck: cppcheck -q -a -j2 postgresql-8.3.7 [postgresql-8.3.7/contrib/cube/cube.c:1418]: (all) Array index out of bounds [postgresql-8.3.7/contrib/cube/cube.c:1437]: (all) Array index out of bounds Best regards Ettl Martin -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] shared_buffers/SHMMAX defaults?
Hello fellow PostgreSQL packagers, recently, I started to get quite a bunch of bug reports a la "PostgreSQL fails to start due to too little shared memory" [1]. I have never seen this before, neither in Debian, so I guess the SHMMAX defaults changed somewhat in Linux 2.6.27. It seems that with other components, such as X.org, using large amounts of shared memory as well, startup sometimes works and sometimes doesn't. Now I wonder what I should do about it. I see these options: (1) Ignore + no hidden magic - very inconvenient, package installation does not create default cluster sometimes, or the default cluster fails to start on system boot Best solution for admin control freaks. (2) Be more conservative about initdb's default setting + no hidden magic + upstream compatible solution - suboptimal performance by default (3) Change SHMMAX in postgresql's init script if necessary + Always works - Unexpected, works behind admin's back. Currently I tend towards (2), but I'd like to hear some more opinions about it. Does anyone else have seen this problem as well? Thanks, Martin [1] https://launchpad.net/bugs/264336 -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] shared_buffers/SHMMAX defaults?
Tom Lane [2009-03-30 20:29 -0400]: > Consider > (4) Lobby your kernel packagers to install saner SHMMAX/SHMALL > defaults. Sounds good. :-) Those are the current defaults: kernel.shmmax = 33554432 kernel.shmall = 2097152 kernel.shmmni = 4096 Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Hello all, I have been packaging cvs snapshots, and now 8.4 beta 1 for Debian recently, and hammered on postgresql-common enough to make it work with 8.4 now (some changed semantics, migration of obsolete/renamed postgresql.conf settings, etc.). Almost all of the tests pass now, so it's generally working great. The test suite detected one regression in libpq, though: Setting $PGHOST now complains about a missing root.crt, although this is only relevant on the server side (or did I misunderstood this?) $ PGHOST=127.0.0.1 /usr/lib/postgresql/8.4/bin/psql -l psql: root certificate file "/home/martin/.postgresql/root.crt" does not exist Thank you! Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Tom Lane [2009-04-10 1:15 -0400]: > Martin Pitt writesyuqhom#3: > > The test suite detected one regression in libpq, though: Setting > > $PGHOST now complains about a missing root.crt, although this is only > > relevant on the server side (or did I misunderstood this?) > > No, that's a progression: the client wants to validate the server's > cert, too. Indeed it is nice to see this feature (great to prevent spoofing), but if I don't have a ~/.postgresql/root.crt at all, it shouldn't certainly break completely? (which it does now). libpq did not bump the SONAME, thus this breaks backwards compatibility with previous PostgreSQL versions which also used libpq.so.5, i. e. from 8.2 on. (Oh, and just for the record: I'm not advocating at all to bump the soname; with thousands of packages linking against it, those are always painful library transitions). Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Peter Eisentraut [2009-04-10 14:56 +0300]: > I assume the server has the snakeoil certificate installed? It is a self-signed certificate indeed (Debian's ssl-cert package). > In that case, it is correct that the client refuses to proceed, > although the exact manner of breaking could perhaps be improved. That may be true for 8.4, and I'm could stop configuring the snakeoil certificate by default. That would make configuring a server for a real SSL certificate harder than it needs to be, though. However, we can't afford to break existing installations. If a user has 8.4 installed locally, he'll use libpq from 8.4, and suddenly he could not connect to a remote SSL 8.3 cluster any more. So the check needs at least be turned into a warning for connecting to a pre-8.4 server. Also, the error message needs to be much clearer. Right now it just tells you that it couldn't find a per-user root.crt and fails. So as an user, I wonder: What is that file? I don't have one, where should I get it from? And why does each user need to have its own? html/libpq-ssl.html describes it fairly well: "When the sslverify parameter is set to cn or cert, libpq will verify that the server certificate is trustworthy by checking the certificate chain up to a CA. For this to work, place the certificate of a trusted CA in the file ~/.postgresql/root.crt in the user's home directory. libpq will then verify that the server's certificate is signed by one of the trusted certificate authorities." Nowhere does it say that the connection will fail immediately if you do not have a root.crt. man psql(1) does not have any word about it, like how to set the sslverify argument. I do see the benefit of failing to connect to an SSL-enabled server *if* I have a root.crt which doesn't match. But why fail if I don't have one? Thanks for considering, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Peter Eisentraut [2009-04-10 22:46 +0300]: > This whole debate hinges on the argument that encryption without > anti-spoofing > is *not* useful. I don't disagree, but it is not *worse* than having no encryption at all. The reason why Debian/Ubuntu install a snakeoil SSL certificate and configure all packages to use it by default is not because we think that this default configuration is "secure" in any way. The reason is that configuring it that way is that it becomes darn easy to make your entire server with all daemons such as postgresql, postfix, dovecot, etc. trusted by simply replacing that central certificate. You can still configure individual services to use a different one. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Peter Eisentraut [2009-04-10 14:56 +0300]: > I assume the server has the snakeoil certificate installed? In that case, it > is correct that the client refuses to proceed, although the exact manner of > breaking could perhaps be improved. Is it really refusing self-signed certificates? That would be strange. I had thought it checks whether the user has the server signing certificate of the server installed on his client home directory (which, BTW, seems like a strange place to default to, and thus keep it). Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Magnus Hagander [2009-04-10 19:14 +0200]: > It's "secure by default". Without it, most people will *never* get > protected by verifying the certificate because they will not manually > copy root certificates there. The problem and fallacy with security is that if you make it too tight, people will just disable it. I'd be the happiest man on the world if the internet would stop using bad SSL certificates, and all those browsers which try to educate the users about exceptions could just refuse the site and do nothing. But unfortunately the world doesn't work that way. Similarly, my concern is that people would rather disable SSL than trying to get all their db users to put a certificate into their home directory (t least this should be configurable at the system-wide level, like checking whether a cert in /etc/ssl/certs/* matches; or making this more flexible to configure the default on a system level at least.) So the nice thing about a warning is that it will stay around and nag people, instead of dragging them into a kneejerk reaction to "fix" their systems which suddenly got "broken". But thanks to everyone for chiming in. Initially I thought it was just a subtle regression. Since it doesn't seem to be, I'll just adapt my test suite if this is going to stay like it is right now. I'm still concerned about the potential confusion, though. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Tom Lane [2009-04-10 19:01 -0400]: > This seems a bit handwavy --- there's a difference between the machine's > own cert and what it thinks is a root cert. Sure. > How do you deal with that? If the root cert is real, how do you put > in self-signed server certs? I'm afraid I don't understand. If an admin replaces the default snakeoil cert with a real one which he got signed by a CA, then of course he would replace the standard system SSL cert (which all the servers default to, and which is initially the snakeoil one) with the "good" certificate. I don't see a reason why an admin would replace a self-signed cert with another self-signed cert? Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Magnus Hagander [2009-04-12 0:29 +0200]: > The option is there already, it's called "none". That's what people are > asking for - they don't care who they are connecting to, just that the > traffic is encrypted (be it legitimate or hacked traffic, at least it's > encrypted). For the record, I don't agree. SSL certificate validation is good, and should be done as long as you have a cert installed. Encryption without authentication is not worth a lot, after all. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Magnus Hagander [2009-04-11 11:50 +0200]: > It treats self-signed certificates the same way it treats anything else. > In the case of a self-signed one, the certificate and the CA certificate > are the same. Thus, you have to copy the server certificate to the client. Right, that's what I had expected. Thanks for confirming. > > I had thought it checks whether the user has the server signing > > certificate of the server installed on his client home directory > > (which, BTW, seems like a strange place to default to, and thus keep > > it). > > That has just been brought up from previous versions. Perhaps we need to > have a system wide root store as well - then you could point that to > whatever snakeoil store you have, and it would find the cert correctly? We couldn't set this up by default, of course, since each installed machine will have a different snakeoil cert (it gets generated during installation). But at least the servers I know often use something like /etc/ssl/certs/.crt and point their services (like apache, postfix, etc.) to this. However, right now the client side psql does not have any system wide configuration files, so adding something like this will need some careful design. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Magnus Hagander [2009-04-12 0:58 +0200]: > Which means that every time I connect, I need to first to make sure that > the file is there, and that the proper user has permissions to read the > file, *before* I connect. Arguably the connection should fail if the file is present, but cannot be read because of permission or syntax errors. That's exactly how the server side behaves as well, and IMHO it's the right thing to do. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Hello Bruce, Bruce Momjian [2009-04-11 8:33 -0400]: > I noticed you didn't quote the next sentence: > > The SSL connection will fail if the server does not present a trusted > certificate. Indeed. When I read it first, it seemed unrelatead to me, but now I understand where this was aiming at. > Which clearly explains _a_ failure, but doesn't link it well to the > behavior. I agree the wording needs improvement so I have update the > doc paragraph to mention "requires" at the beginning": > > I will now look at improving the libpq error message. I saw your patches. Many thanks, this is much clearer now. Bruce Momjian [2009-04-11 17:42 -0400]: > The only other approach would be to add an sslverify value of > 'try' that tries only if root.crt exists. The semantics of this sound like a good default to me, since it would enforce a good cert as soon as I start caring, i. e. when I actually have a root.crt to verify against. This is the kind of "single-action SSL enabling" workflow I was already looking for when configuring the snakeoil SSL cert by default. Perhaps it shouldn't be called "try", though, maybe "cert" should have above semantics, and "force" should have the currently implemented one (i. e. fail if not present)? But that gets us dangerously close to bikeshedding now... Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Stephen Frost [2009-04-14 9:09 -0400]: > I disagree, and you *can* do authentication without SSL! I know. But then you do have authentication as well, which was exactly my point. Also, I said "not a lot better", not "totally useless". Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] libpq 8.4 beta1: $PGHOST complains about missing root.crt
Stephen Frost [2009-04-14 9:18 -0400]: > * Martin Pitt (mp...@debian.org) wrote: > > We couldn't set this up by default, of course, since each installed > > machine will have a different snakeoil cert (it gets generated during > > installation). > > It's worse than that.. Obviously, you can have the client installed on > systems which aren't where the server is (we do this alot..) and there's > no way for a packaging system to pull the cert from the server. Of course I assumed that the server and client are on different systems. If they are on the same, then we just use the Unix socket and don't need all this SSL fuss at all. > If we're going to do something along those lines, we should start by > supporting a CA cert directory or similar. We could then recommend > ca-certificates and default config the client to use those. Of course, > anyone who actually cares about security probably wouldn't install > ca-certificates, but it's what the browsers use. Hm, that sounds like opening a can of worms, TBH. But yes, once the final defaults in psql are agreed upon, we can discuss the packaging. Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
[BUGS] 8.4 dropped Russian server translations
Hello all, is there any reason why 8.4 dropped src/backend/po/ru.po? It was still present in 8.3, and still works. It might perhaps not be entirely up to date, but 90% coverage is certainly better than 0? Or were there any other problems with it? Thanks in advance, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) signature.asc Description: Digital signature
Re: [BUGS] 8.4 dropped Russian server translations
Tom Lane [2009-09-06 10:24 -0400]: > According to > http://babel.postgresql.org/ > it's more like 38%. Ah, thanks for the link! Makes sense then. Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5041: Changing data_directory problem
Jonas [2009-09-06 17:29 +]: > After changing data_directory - in the same way as I did for postgres 8.3 - The official way is to move the directory and set "data_directory" in postgresql.conf. (Or create a new cluster with the -d/--datadir option). Is that what you did? Please give us the output of "pg_lsclusters". Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #5043: Stored procedure returning different results for same arguments
The following bug has been logged online: Bug reference: 5043 Logged by: Martin Edlman Email address: edl...@fortech.cz PostgreSQL version: 8.2.0 Operating system: Linux (RHEL 4.4) Description:Stored procedure returning different results for same arguments Details: I have a stored procedure (SP) get_schemebind_date(int, date) which looks up a date of validity of a payment scheme. Table schemebind contains valid_from (date), schemeid (int), contractid (int). There are these records in schemebind '2008-11-01', 123, 1004 '2009-09-01', 456, 1004 When I call "select get_schemebind_date(1004,'2009-09-01')" from psql I get correct result, which is 2009-09-01. But when I call it from within another sp (let's call it xfunc(int, date, varchar), I get wrong result 2008-11-01. The date passed to xfunc() is then passed to get_schemebind_date(). I enabled RAISE NOTICE to see the parameters and the result, in case I call get_schemebind_date() from console I see NOTICE: get_schemebind_date(1004, 2009-09-01) = 2009-09-01 In case get_schemebind_date() is called from xfunc() I see NOTICE: get_schemebind_date(1004, 2009-09-01) = 2008-11-01 I really don't understand it. All parameters are of type date, column valid_from is of type date as well. If you need full code of xfunc, I can send it to you. CREATE OR REPLACE FUNCTION get_schemebind_date(integer, date) RETURNS date AS $BODY$ DECLARE rec RECORD; con ALIAS FOR $1; dat ALIAS FOR $2; BEGIN SELECT max(valid_from) AS vf INTO rec FROM schemebind WHERE valid_from <= dat AND contractid = con; RAISE NOTICE 'get_schemebind_date(%, %) = %', con, dat, rec.vf; IF FOUND THEN RETURN rec.vf; END IF; RETURN NULL; END $BODY$ LANGUAGE 'plpgsql' VOLATILE; ALTER FUNCTION get_schemebind_date(integer, date) OWNER TO postgres; -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: [BUGS] BUG #5043: Stored procedure returning different results for same arguments
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, > please send function xfunc. Your code looks well. > please try sql function > ... > has it same behave like plpgsql function? Yes, result is the same - it returns 2008-11-01 I made further investigation - it seems the problem is here between the keyboard and the chair :-) As I wrote an answer for you I realized the problem. The xfunc() and therefore get_schemebind_date() is called from a trigger AFTER DELETE ON schemebind. So the trigger deletes the '2009-09-01' record, get_schemebind_date() then returns correct result '2008-11-01'. But xfunc() then fails and the trigger operation is rolled back and I see the '2009-09-01' record again... Sorry guys for bothering you and taking your time. Regards, - -- Martin Edlman Fortech, spol. s r.o, Ropkova 51, 57001 Litomyšl Public GPG key: http://edas.visaci.cz/#gpgkeys -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkqnfE4ACgkQqmMakYm+VJ8iswCggwTcu9pZQOaAjAIjW0D22kTs HYIAni3mLdNilwgxNeQsGFxNogBg6OCL =ZVLv -END PGP SIGNATURE- -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #5055: Invalid page header error
The following bug has been logged online: Bug reference: 5055 Logged by: john martin Email address: postgres_...@live.com PostgreSQL version: 8.3.6 Operating system: Centos 5.2 32 bit Description:Invalid page header error Details: All of a sudden we started seeing page header errors in certain queries. The messages are in the form of "ERROR: invalid page header in block of relation ". The query fails. I found may previous messages in the archives. Most, if not all, replies seemed to indicate hardware errors. I have run all the disk/memory tests like fsync and memtest86 but nothing was found. I have also rebooted is multiple times . I found an unsatisfactory work around that causes, ahem, data loss. We went ahead with it anyway fortunately because the error happened in our dev environment. IOW, we could tolerate the data loss. The work around consists of adding the following parameter to postgresql.conf and restarting postgres. "zero_damaged_pages=TRUE" We no longer see the error messages with the above work around. Needless to say, the work around cannot be used in production. But the database is running on the SAME HARDWARE. Is it possible that it is a postgres bug? I found the issue reported 5 years back to my surprise. http://archives.postgresql.org/pgsql-hackers/2004-09/msg00869.php I am urging the community to investigate the possibility that it may not be hardware related, especially since it was first reported at least 5 years back. Or may be you have decided not to fix if the number of people reporting is very less. I have a very good opinion of postgres quality. While I am not 100% sure it is a bug (only circumstantial evidence), I do think it improves the product quality to fix an annoying old bug. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] Small syntax error in fmgr.h
Hello PostgreSQL developers, https://launchpad.net/bugs/458020 reports a small syntax error in ./src/include/fmgr.h:338: extern int no_such_variable The trailing semicolon is missing: "I had to make the changes in the attached patch file in order to use the PG_MODULE_MAGIC macro. From a quick scan it looks as though there may also be a similar problem with PG_FUNCTION_INFO_V1 also on line 329. " Thanks, Martin -- Martin Pitt| http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] BUG #5204: ODBC connection NOT working
The following bug has been logged online: Bug reference: 5204 Logged by: Alan Martin Email address: alan.mar...@mightyautoparts.com PostgreSQL version: 08.04.0100 Operating system: Windows 7 64-bit Description:ODBC connection NOT working Details: Good morning. I've been struggling with this install for most of a day now. Basically, the program INSTALLS fine, but doesn't work. It's listed under installed applications, but when you go to Admin/ODBC and check Drivers, there's no listing for PostgreSQL. Because the driver's not showing, I can't create a data source, which is necessary to access some important internal applications. I've looked around on the 'net for a solution, and the only one that looked promising (installing PostgreSQL version 8.0) isn't possible since the installer has been taken down. Any help would be appreciated! -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
[BUGS] UTF-8 encoding failure
Hi, Is this the right place to report bugs? The attached program creates a table with Japanese column names. When the column names are retrieved in a query using PQfname, and invalid string is returned. The invalid column names can also be seen in PGAdmin III. This only seems to happen with one (or more?) specific Japanese character. Operating System: Windows Vista Ultimate SP2 32bit PostgreSQL server versions: 8.4.2 and 8.3.3 both fail libpq version: 8.3.6 Database encoding: UTF8 Client encoding: - UTF8: does not return the same column name used to create the table. - SJIS: "select * from table" fails with error: ERROR: invalid byte sequence for encoding "UTF8": 0xe59eff HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding". >From what I can see the character in question has the following encodings: SJIS: 8c b4 UTF-16: 9f 53 UTF-8: e5 8e 9f Any chance this problem could be fixed soon? Bye, Martin Schäfer Principal Software Engineer Cadcorp Computer Aided Development Corporation Ltd. 1 Heathcock Court, London, WC2R 0NT martin.schae...@cadcorp.com www.cadcorp.com This email is confidential and may be privileged and should not be used, read or copied by anyone who is not the original intended recipient. If you have received this email in error please inform the sender and delete it from your mailbox or any other storage mechanism. Unless specifically stated, nothing in this email constitutes an offer by Cadcorp and Cadcorp does not warrant that any information contained in this email is accurate. Cadcorp cannot accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of Cadcorp or one of its agents. Please rely on your own virus check. No responsibility is taken by Cadcorp for any damage arising out of any bug or virus infection. ÿþ# i n c l u d e "