Re: [GENERAL] pgAdmin complains about vacuuming required after fresh 8.1 install

2008-06-11 Thread Collin Peters
Bump Does anyone have *any* thoughts on this? This seems to be a fairly common problem. Does anybody have any good links that they can provide to find an answer? My current test is that I have a table where all the rows were purged, and then new ones inserted using a specific job. pgAdmin repo

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Tom Lane
Adam Dear <[EMAIL PROTECTED]> writes: > madisoncounty=# select ctid,xmin,xmax,cmin,cmax,usename from pg_shadow; > ctid | xmin | xmax | cmin | cmax |usename > ---+--+--+--+--+--- > (0,1) |1 | 596 | 596 |1 | postgres > (0,2) |2 |1 |1 |

Re: [GENERAL] Determining offsets to jump to grab a group of records

2008-06-11 Thread Scott Marlowe
On Wed, Jun 11, 2008 at 4:39 PM, David Lambert <[EMAIL PROTECTED]> wrote: > > We have already looked into using CURSORS but they must be within a > transaction and we could have many of these grids open at any given time > looking at different tables. > > So the end result is that we are trying to

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-11 Thread Klint Gore
Stevo Slavić wrote: I'm trying to make implementation more generic, not to use Postgres specific SQL, and through Hibernate and Spring configuration make services acquire lock on batch of rows, when trying to acquire lock on batch of rows an exception should be thrown if rows are already locked

Re: [GENERAL] array column and b-tree index allowing only 8191 bytes

2008-06-11 Thread Celso Pinto
Hi Alvaro, thanks for the hint. I've since experimented with gin and gist and did a small pgbench custom script test. Recalling from my previous message, the int[] on a row can have a maximum of 5000 values. From here I judged gin to be the best option but inserting is really slow. The test was p

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
madisoncounty=# select ctid,xmin,xmax,cmin,cmax,usename from pg_shadow; ctid | xmin | xmax | cmin | cmax |usename ---+--+--+--+--+--- (0,1) |1 | 596 | 596 |1 | postgres (0,2) |2 |1 |1 |0 | postgres (0,5) |2 |0 |0 |0

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Tom Lane
Adam Dear <[EMAIL PROTECTED]> writes: > The record is still there. Hmph. Could we see all the system columns from that table? select ctid,xmin,xmax,cmin,cmax,usename from pg_shadow; regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresq

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
I tried: Vacuum Freeze pg_shadow; Then Reindex database madisoncounty; Then Delete from pg_shadow where ctid='(0,1)'; The record is still there. Tom Lane wrote: Adam Dear <[EMAIL PROTECTED]> writes: I tried: Delete from pg_shadow where ctid = '(0,1)'; DELETE 0 This is looking more and

Re: [GENERAL] Determining offsets to jump to grab a group of records

2008-06-11 Thread David Lambert
David Wilson wrote: This isn't an answer to your direct question, but it seems to me as if you've already decided on a solution (figuring out an offset) that's non-optimal. If you're using offsets at all, you must have a distinct sort ordering; if you have that, you should be able to accomplish t

Re: [GENERAL] Missing chunk number on a view?

2008-06-11 Thread Tom Lane
Keaton Adams <[EMAIL PROTECTED]> writes: > Sorry. Good point. I always try to remember to include that important info: > PostgreSQL 8.1.4 on RHEL 4 (we're moving to 8.3.x on RHEL 5 this summer) okay, in 8.1 I get regression=# select reltoastrelid from pg_class where relname = 'pg_rewrite'; re

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Tom Lane
Adam Dear <[EMAIL PROTECTED]> writes: > I tried: > Delete from pg_shadow where ctid = '(0,1)'; > DELETE 0 This is looking more and more like a transaction ID wraparound problem. Did you try the vacuum freeze suggestion? regards, tom lane -- Sent via pgsql-general mailing

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
I managed to get the server started again. It was failing because the permissions on the data folder were not right. Now, though, I'm back to where I started. There are two postgres users in the pg_shadow table. One of them has a password, the other doesn't, but they both have the same sysi

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Tom Lane
Adam Dear <[EMAIL PROTECTED]> writes: > I'm not seeing the madisoncounty user in there. Odder and odder. It might be worth trying "vacuum freeze pg_shadow". > Also, I tried starting > the db using /etc/init.d/postgres start, and it fails. Fails how? In particular, what shows up in the postmas

Re: [GENERAL] Determining offsets to jump to grab a group of records

2008-06-11 Thread David Wilson
On Wed, Jun 11, 2008 at 5:54 PM, David Lambert <[EMAIL PROTECTED]> wrote: > I am trying to find a way to figure out what offset I would have to use in a > SELECT with LIMIT and OFFSET clauses to get a grouping of records. For > example: > > Consider a table full of first names. I want to be able

[GENERAL] Determining offsets to jump to grab a group of records

2008-06-11 Thread David Lambert
I am trying to find a way to figure out what offset I would have to use in a SELECT with LIMIT and OFFSET clauses to get a grouping of records. For example: Consider a table full of first names. I want to be able to find the first offset where the name is "DAVID". (We'll say that it is the

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
I really appreciate you help so far. here is what I am seeing . I did: select * from pg_shadow; 1: usename (typeid = 19, len = 64, typmod = -1, byval = f) 2: usesysid(typeid = 23, len = 4, typmod = -1, byval = t) 3: usecreatedb (typeid = 16, len = 1, typmod = -1, byv

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Tom Lane
Adam Dear <[EMAIL PROTECTED]> writes: > I ran the select as instructed, and this is the output: > madisoncounty=# select ctid, usename, usesysid from pg_shadow; > ctid |usename| usesysid > ---+---+-- > (0,1) | postgres |1 > (0,2) | postgres |

Re: [GENERAL] Missing chunk number on a view?

2008-06-11 Thread Keaton Adams
Sorry. Good point. I always try to remember to include that important info: PostgreSQL 8.1.4 on RHEL 4 (we're moving to 8.3.x on RHEL 5 this summer) Thanks again, Keaton On 6/11/08 2:20 PM, "Tom Lane" <[EMAIL PROTECTED]> wrote: Keaton Adams <[EMAIL PROTECTED]> writes: > When I attempt to

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
I ran the select as instructed, and this is the output: madisoncounty=# select ctid, usename, usesysid from pg_shadow; ctid |usename| usesysid ---+---+-- (0,1) | postgres |1 (0,2) | postgres |1 (0,5) | madisoncounty | 100 (3 rows

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Tom Lane
Adam Dear <[EMAIL PROTECTED]> writes: > pg_dump: query to obtain list of schemas failed: ERROR: more than one > row returned by a subquery used as an expression > The pg_dump command is from version 7.4.11. This is the version of > postgres I am running on my old server. Just FYI, when doing

Re: [GENERAL] Missing chunk number on a view?

2008-06-11 Thread Tom Lane
Keaton Adams <[EMAIL PROTECTED]> writes: > When I attempt to drop the view I receive the following: > keaton=# drop view kda_log_data cascade; > ERROR: missing chunk number 0 for toast value 84631845 Presumably the toasted object in question is pg_rewrite's textual representation of the view's O

[GENERAL] Missing chunk number on a view?

2008-06-11 Thread Keaton Adams
I searched the archives and found references to the "missing chunk number 0 for toast value X" error and tried the suggestions, but can't seem to resolve this particular problem. This is a test/QA system that uses an iSCSI disk array. Yesterday the array hiccupped and had to be rebooted while

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
The pg_dump command is from version 7.4.11. This is the version of postgres I am running on my old server. Craig Ringer wrote: Adam Dear wrote: pg_dump: query to obtain list of schemas failed: ERROR: more than one row returned by a subquery used as an expression Is the pg_dump command fro

Re: [GENERAL] encoding confusion

2008-06-11 Thread Alban Hertroys
On Jun 11, 2008, at 9:03 AM, Richard Huxton wrote: Sim Zacks wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The data in the longblob field might be text, which could be causing the confusion. For example, when I look at the data in the longblob field, I see /n for a newline and when

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Craig Ringer
Adam Dear wrote: pg_dump: query to obtain list of schemas failed: ERROR: more than one row returned by a subquery used as an expression Is the pg_dump command from the old postgresql install or the new one? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

[GENERAL] Unable to dump database using pg_dump

2008-06-11 Thread Adam Dear
I am migrating to a new server. I am trying to get a dump of my database to import into postgres 8.1.11 on my new server. When I run the pg_dump commmand: pg_dump --clean --file=madison.sql --schema=public -U madisoncounty madisoncounty I get this message: pg_dump: query to obtain list of

[GENERAL] Call for proposals: PDXPUG PgDay at OSCON - proposals due FRIDAY!

2008-06-11 Thread Selena Deckelmann
The deadline for proposals is June 20, 2008. Please submit something today! PDXPUG PgDay will be on July 20, 2008. This is a one-day conference happening the day before OSCON at the Oregon Convention Center. We are inviting anyone who has something interesting to share about PostgreSQL to send

Re: [GENERAL] what gives: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE

2008-06-11 Thread Richard Broersma
On Wed, Jun 11, 2008 at 12:07 AM, Richard Huxton <[EMAIL PROTECTED]> wrote: >> 2008-06-10 15:04:52instrumentation ERROR: syntax error at or near >> "SELECT" at character 16 >> 2008-06-10 15:04:52instrumentation STATEMENT: SELECT INVALID SELECT >> STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STAT

Re: [GENERAL] Insert into master table ->" 0 rows affected" -> Hibernate problems

2008-06-11 Thread Mattias.Arbin
Hm, Thanks again for helping out. I think it would be hard to live without the WHERE statemement in my case, since I will have a steady flow of inserts and need to have a partition ready when time passes a partition boundary. I would have to update the rule at the exact millisecond, wouldn't I? I

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-11 Thread Leif B. Kristensen
On Wednesday 11. June 2008, Leif B. Kristensen wrote: >p := BTRIM(tmp, '#')::INTEGER; >name := get_person_name(p); >str := REPLACE(str, tmp, name); I did some "folding" and replaced the above with str := REPLACE(str, tmp, get_person_name(BTRIM(tmp, '#')::INTEGER)); and g

Re: [GENERAL] "connect by"

2008-06-11 Thread valgog
On Jun 9, 4:54 pm, [EMAIL PROTECTED] ("Roberts, Jon") wrote: > I need a high performing version of Oracle's connect by functionality in > PostgreSQL.  I saw some dispute about attempts to add this in the > archives and a reference to an ANSI alternative "with" statement.  Is > either of these funct

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-11 Thread Csaba Nagy
We also have such a queue here, and our solution is an algorithm like this: 1. get the next processor_count * 2 queue ids which are not marked as taken; 2. choose randomly one of these ids; 3. lock for update with nowait; 4. if locking succeeds: 4.1. check again the item, as it could have

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-11 Thread Stevo Slavić
Hello all, I've initially brought the question to Nix, so I'll try to clarify situation. Whole point is to have multiple services accessing same table and dividing the work, so locking with waiting for lock to be released is out of question. I want to deploy same Java Spring Web applicatio

Re: [GENERAL] REGEXP_REPLACE woes

2008-06-11 Thread Leif B. Kristensen
For the record: I've got two different flavors of those "shortlinks". The first one, [p=123|John Smith] is the one that I started this thread with. The second one is just a person number like [p=123] and should be expanded to a similar link, with the default person name (fetched by get_person_n

Re: [GENERAL] Application EventLog: could not write to log file: Bad file descriptor

2008-06-11 Thread Ati Rosselet
Well.. I guess I'll just have to hope it pops up rarely enough to not be a problem since I really don't have the capacity to try to debug postgres code for the foreseeable future :) Should I log a bugreport, or a suspected bug report (if such an animal exists...)? :) Cheers Ati On Mon, Jun 9, 2

Re: [GENERAL] Insert into master table ->" 0 rows affected" -> Hibernate problems

2008-06-11 Thread Magnus Hagander
Ah, in my testing I had a single RULE without a WHERE statement. In that case it works. If I add a WHERE statement to it, it no longer works. So it works for the case when you always want to redirect all new inserts into the same partition. //Magnus [EMAIL PROTECTED] wrote: > I tried using rules

Re: [GENERAL] [ANNOUNCE] PostgreSQL Software Catalogue

2008-06-11 Thread Magnus Hagander
Dave Page wrote: > On Tue, Jun 10, 2008 at 5:56 PM, Tatsuo Ishii <[EMAIL PROTECTED]> wrote: >> Is it possible for non-software services to be listed in the list? >> What I have in my mind is, PostgreSQL Certification program. > > Hi, > > The software catalogue is just for software - a certificati

Re: [GENERAL] Multithreaded queue in PgSQL

2008-06-11 Thread valgog
On Jun 10, 1:58 pm, [EMAIL PROTECTED] (Nikola Milutinovic) wrote: > > You may find that the PGQ component of skytools is what you want: > >  http://pgfoundry.org/projects/skytools > >  http://skytools.projects.postgresql.org/doc/ > >  http://skytools.projects.postgresql.org/doc/pgq-sql.html > > Tha

Re: [GENERAL] what gives: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE

2008-06-11 Thread Richard Huxton
Richard Broersma wrote: Server logs below. Notice how an error raised in a connection to the proj02u20411 database forces the transaction in the instrumentation database to rollback. Can anyone explain why connections that as far as PG should conserned are unrelated are actually interferring wit

Re: [GENERAL] encoding confusion

2008-06-11 Thread Richard Huxton
Sim Zacks wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The data in the longblob field might be text, which could be causing the confusion. For example, when I look at the data in the longblob field, I see /n for a newline and when I look at the bytea it is 012. That's right - newline i