Re: [GENERAL] Any recommended forums/wiki/blog s/w that uses PostGreSQL?

2004-08-17 Thread Shridhar Daithankar
On Tuesday 17 Aug 2004 6:59 pm, Eric D Nielsen wrote:
 I've been trying to setup a collaboration site, ideally I need
 forum+wiki+blog integrated functionality access control.  Specificly either
 the wiki or blog need to be over viewable to members of certain groups.

 I'm used to phpBB for forum software and it seems to have nice support for
 PostGreSQL.  I tried out about 4 wikis last night, most had extreme bugs
 when using their PostGreSQL code instead of the defauly MySQL.

 Anyone have any suggestions?

drupal? Check out at http://www.drupal.org/

 Shridhar

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] could not find block containing chunk 0x8483530

2004-08-17 Thread Alvaro Herrera
On Tue, Aug 17, 2004 at 10:00:16AM +0530, Vinay Jain wrote:
 On Tue, 17 Aug 2004 09:59:40 +0530, Vinay Jain [EMAIL PROTECTED] wrote:
  On Mon, 16 Aug 2004 10:39:18 -0400, Tom Lane [EMAIL PROTECTED] wrote:
   Vinay Jain [EMAIL PROTECTED] writes:
select *, lower(name) from student;
gives error: could not find block containing chunk 0x8483530
  
   That's some sort of memory manipulation bug --- pfree'ing a wrong
   pointer, likely.
  
 I am not using pfree in C code. but I am using palloc for memory allocation.
 
 All other queries like: select * from student order by lower(name);
  gives appropriate result.

Maybe you are palloc'ing in the wrong memory context.  Make sure you
understand how memory contexts are used and thier longevity.

If you want anything more specific, you should post your code.

-- 
Alvaro Herrera (alvherre[a]dcc.uchile.cl)
Vivir y dejar de vivir son soluciones imaginarias.
La existencia está en otra parte (Andre Breton)


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Any recommended forums/wiki/blog s/w that uses

2004-08-17 Thread Devrim GUNDUZ

Hi,

On Tue, 17 Aug 2004, Shridhar Daithankar wrote:

  Anyone have any suggestions?
 
 drupal? Check out at http://www.drupal.org/

Drupal needs some hacking since it uses LIMIT #,# queries in 
database-pear.php. 

Just a FYI.
-- 
Devrim GUNDUZ  
devrim~gunduz.org   devrim.gunduz~linux.org.tr 
http://www.tdmsoft.com
http://www.gunduz.org


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] Does a 'stable' deferred trigger execution order exist? - answer: yes

2004-08-17 Thread Tom Lane
Frank van Vugt [EMAIL PROTECTED] writes:
 Order in which they were defined?  Hmm, I thought we had agreed long
 since to trigger these things in alphabetical order.  Something is wrong
 here.

 Allow me to repeat and possibly clarify an earlier (personal) point of 
 interest:

 Any execution order for regular triggers would be as good as any other, given
 the fact that it is a single atomic event that triggered them, a design 
 should not try to make use of a specific order. The same goes for deferred 
 triggers that fired on the same event, the particular order of trigger 
 execution within this set should not be of any interest.

This is perhaps true for cleanly designed applications, but people
have requested that we nail down the execution order, and we have
responded by specifying that it's alphabetical within an event.
(Not order of creation --- alphabetical lets you insert later-created
triggers where you need to in the firing order, order-of-creation
does not.)  The intention was certainly to apply this to AFTER as well
as BEFORE triggers.  We'll need to look and see why it's not working.

 However, the accumulated collection of deferred triggers at the end of a 
 transaction possibly exists of many sets, each of which was fired on a 
 different event, on a different point in time. Therefore, IMHO, it is 
 possible for a dependancy between certain sets to be valid and handled 
 properly by the fact that at least the sets itself are executed in the same 
 order as the original events they fired upon.

Right.  This is handled by appending new pending-trigger events to a
global list when they are detected.  Barring oddities such as different
deferral specifications, they should be executed in order of detection.
I would have expected triggers for the same event to be inserted in
alphabetical order ...

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Web application: Programming language/Framework

2004-08-17 Thread Gustavo Franklin Nbrega - PLANAE
Off course PHP is a very weak language... Is than weak that SF.net have 
9144 PHP projects  and 3292 Python projects. Python is a very good 
language, but is discourteous (or that is a signal of knowledge lack) to 
speak that 'php is a very weak language', when knows that exist so many 
PHP programmers in this list.  Futhermore,  this  subject is not  part 
of this list.

Pierre-Frédéric Caillaud wrote:
PHP is a very weak language... I'd advise mod_python or skunkweb, 
if you  don't know Python, learn it, you won't be disappointed !


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])


--
Gustavo Franklin Nóbrega
Infra Estrutura - Banco de Dados
Planae - Tecnologia Da Informação
Fone/Fax +55 14 3224-3066 Ramal : 210
http://www.planae.com.br

---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [GENERAL] Any recommended forums/wiki/blog s/w that uses

2004-08-17 Thread David Rysdam
Devrim GUNDUZ wrote:
Hi,
On Tue, 17 Aug 2004, Shridhar Daithankar wrote:
 

Anyone have any suggestions?
 

drupal? Check out at http://www.drupal.org/
   

Drupal needs some hacking since it uses LIMIT #,# queries in 
database-pear.php. 

Just a FYI.
 

I tried and really liked MoinMoin.  http://moinmoin.wikiwikiweb.de/
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
   (send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [GENERAL] major database breakdown

2004-08-17 Thread Tom Lane
Ulrich Wisser [EMAIL PROTECTED] writes:
 I did delete everything from pg_statistic. It helped somewhat but
 still there is something strange. Please see the transcript of my 
 session below. How can I fix these broken indexes? I can't drop and 
 recreate them.

I am not sure what's going on with pg_statistic, but it seems like
maybe there are some tuples that aren't getting deleted.  Try
delete from pg_statistic
vacuum verbose pg_statistic
(In a standalone backend it seems you need set server_min_messages = debug
to see anything from the vacuum verbose.)  If that shows a nonzero
number of remaining tuples then try truncate pg_statistic instead.
(I think you'll need to have started the backend with -O to be allowed
to do this.  Also it might be interesting to look at the remaining rows
with pg_filedump before you truncate.)

I suspect that the ultimate answer may be dump and reload the
database :-(.  If there are undeletable rows in pg_statistic, the only
explanation I can think of is transaction ID corruption (ie, their xmax
values are in the future) and the problem may affect other data too.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Any recommended forums/wiki/blog s/w that uses

2004-08-17 Thread Robby Russell
On Tue, 2004-08-17 at 06:29, Eric D Nielsen wrote:
 I've been trying to setup a collaboration site, ideally I need forum+wiki+blog
 integrated functionality access control.  Specificly either the wiki or blog
 need to be over viewable to members of certain groups.
 
 I'm used to phpBB for forum software and it seems to have nice support for
 PostGreSQL.  I tried out about 4 wikis last night, most had extreme bugs when
 using their PostGreSQL code instead of the defauly MySQL.
 
 Anyone have any suggestions?
 
 Thanks,
 
 Eric
 

phpwiki can utilize a PostgreSQL backend.

-Robby


-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
/



signature.asc
Description: This is a digitally signed message part


Re: [GENERAL] Pgsql 7.3/7.4/8.0 on IA64 HP-UX 11i?

2004-08-17 Thread Ed L.
On Monday August 16 2004 5:44, Tom Lane wrote:
 Ed L. [EMAIL PROTECTED] writes:
  cc -Ae +O2 -I../../../../src/include -D_XOPEN_SOURCE_EXTENDED   -c -o
  xlog.o xlog.c (Bundled) cc: warning 922: -Ae is unsupported in the
  bundled compiler, ignored. (Bundled) cc: warning 922: +O2 is
  unsupported in the bundled compiler, ignored.

 You should hardly be worrying about spinlock performance when you are
 using that toy non-optimizing compiler.  Get a real compiler --- either
 gcc or HP's extra-money compiler ...

 Aside from being free, gcc has the advantage that the spinlock code
 should work out-of-the-box.  I don't think anyone's built a solution
 for HP's compiler on IA64 yet.

Thanks for the tip.  I installed the following depots, exported CC=gcc, and 
8.0.0beta1 built fine, no warnings or errors, and loads from 7.3.4 dump 
just fine.

make-3.80-sd-11.22.depot.gz, bison-1.875-sd-11.22.depot.gz, 
flex-2.5.4a-sd-11.00.depot.gz, gcc-3.3.2-sd-11.22.depot.gz

$psql -c select version()
   version   
-
 PostgreSQL 8.0.0beta1 on ia64-hp-hpux11.23, compiled by GCC gcc (GCC) 3.3.2


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Pgsql 7.3/7.4/8.0 on IA64 HP-UX 11i?

2004-08-17 Thread Tom Lane
Ed L. [EMAIL PROTECTED] writes:
 Is gcc supposed to work for 7.3.4 on IA64 HP-UX 11.23 as well?

No, 7.4 is our first release that has any idea that HPUX can run on any
hardware but HPPA.  If you're desperate you could try backporting this
7.4 fix:

2003-08-01 15:12  tgl

* configure, configure.in, src/backend/port/hpux/tas.c.template,
src/backend/port/tas/hpux.s, src/backend/port/tas/hpux_hppa.s,
src/include/port/hpux.h, src/include/storage/s_lock.h: Since HPUX
now exists for Itanium, we should decouple the assumption that
OS=hpux is the same as CPU=hppa.  First steps at doing this.  With
these patches, we still work on hppa with either gcc or HP's cc. 
We might work on hpux/itanium with gcc, but I can't test it. 
Definitely will not work on hpux/itanium with non-gcc compiler, for
lack of spinlock code.

regards, tom lane

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] apple uses Postgres for RemoteDesktop 2

2004-08-17 Thread Tom Lane
David Teran [EMAIL PROTECTED] writes:
 maybe anyone already knows that Apple is distributing Postgres 7.3.3 
 with RemoteDesktop 2. Its located in 
 /System/Library/CoreServices/RemoteManagement/rmdb.bundle/

 BUT... they did not do a good job: -their- installation is using the 
 default port which means: either -their- version works or the one that 
 the server owner maybe installed on the same server. In our case 
 neither our Postgres nor the one from RemoteDesktop 2 did start up 
 because of file conflicts.

 If anyone from the Postgres (or from whereever) team is in contact with 
 apple about RemoteDesktop and Postgres it would be great it they could 
 ask apple to change their port, its unbelievable that they did not care 
 about this problem.

Yikes.  They need to get off of that badly broken PG version, too :-(
7.3.3 was about the worst choice they could have made in the past
several years ...

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [GENERAL] Pgsql 7.3/7.4/8.0 on IA64 HP-UX 11i?

2004-08-17 Thread Ed L.
On Tuesday August 17 2004 10:08, Tom Lane wrote:
 Ed L. [EMAIL PROTECTED] writes:
  Is gcc supposed to work for 7.3.4 on IA64 HP-UX 11.23 as well?

 No, 7.4 is our first release that has any idea that HPUX can run on any
 hardware but HPPA.  If you're desperate you could try backporting this
 7.4 fix:

OK, thx, I may give that a brief try before reconsidering upgrade.  

On a related topic, while looking into oddities of an HP-UX iexpress bundle 
install of pgsql that had .../lib/hpux32 and .../lib/hpux64 
directories, we noticed the following:

$ file `which psql`
/opt/pgsql/postgresql-8.0.0beta1/bin/psql: ELF-32 executable object file 
- IA64

This is the same for *many* of the executables in /bin.  Does this mean it 
is a 32-bit executable?  Does it also, therefore, mean that is not taking 
advantage of the 64-bit hardware?  If so, is there something special I need 
to pass to pgsql's configure to get it to build 64-bit executables to fully 
exploit this expensive hardware?

TIA.


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


Re: [GENERAL] Pgsql 7.3/7.4/8.0 on IA64 HP-UX 11i?

2004-08-17 Thread Tom Lane
Ed L. [EMAIL PROTECTED] writes:
 $ file `which psql`
 /opt/pgsql/postgresql-8.0.0beta1/bin/psql: ELF-32 executable object file 
 - IA64

 This is the same for *many* of the executables in /bin.  Does this mean it 
 is a 32-bit executable?

Looks like it to me.

 Does it also, therefore, mean that is not taking 
 advantage of the 64-bit hardware?  If so, is there something special I need 
 to pass to pgsql's configure to get it to build 64-bit executables to fully 
 exploit this expensive hardware?

I wouldn't panic.  99% of the value of a 64-bit box for database work
is that you can handle more than 4Gb worth of RAM for disk cache.  Since
in Postgres's worldview most of the disk caching is supposed to be done
by the kernel, it really matters not whether the Postgres executables
think they are 32-bit or 64-bit.  All you need is a 64-bit kernel.

regards, tom lane

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[GENERAL] PANIC: btree_split_redo: lost left sibling?

2004-08-17 Thread Andrew Sukow
Greetings,

Our postgres system crashed and upon restarting it our database had the following 
errors.  The error log was 4.5 gigs which is much larger than usual.  We looked online 
for information about lost left siblings and how to fix the data and not lose the 400 
million records we have.  Anyone have an idea what's the matter and what the fix is?

LOG:  database system was interrupted while in recovery at 2004-08-17 08:59:41 PDT
HINT:  This probably means that some data is corrupted and you will have to use the 
last backup for recovery.
LOG:  checkpoint record is at 326/C007B778
LOG:  redo record is at 326/BD899570; undo record is at 0/0; shutdown FALSE
LOG:  next transaction ID: 46922114; next OID: 133662911
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  redo starts at 326/BD899570
PANIC:  btree_split_redo: lost left sibling
LOG:  startup process (PID 9038) was terminated by signal 6
LOG:  aborting startup due to startup process failure

Thanks,

Andrew



---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] PANIC: btree_split_redo: lost left sibling?

2004-08-17 Thread Bruce Momjian

Please provide a PostgreSQL version and operating system information.

---

Andrew Sukow wrote:
 Greetings,
 
 Our postgres system crashed and upon restarting it our database had the following 
 errors.  The error log was 4.5 gigs which is much larger than usual.  We looked 
 online for information about lost left siblings and how to fix the data and not lose 
 the 400 million records we have.  Anyone have an idea what's the matter and what the 
 fix is?
 
 LOG:  database system was interrupted while in recovery at 2004-08-17 08:59:41 PDT
 HINT:  This probably means that some data is corrupted and you will have to use the 
 last backup for recovery.
 LOG:  checkpoint record is at 326/C007B778
 LOG:  redo record is at 326/BD899570; undo record is at 0/0; shutdown FALSE
 LOG:  next transaction ID: 46922114; next OID: 133662911
 LOG:  database system was not properly shut down; automatic recovery in progress
 LOG:  redo starts at 326/BD899570
 PANIC:  btree_split_redo: lost left sibling
 LOG:  startup process (PID 9038) was terminated by signal 6
 LOG:  aborting startup due to startup process failure
 
 Thanks,
 
 Andrew
 
 
 
 ---(end of broadcast)---
 TIP 4: Don't 'kill -9' the postmaster
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] PANIC: btree_split_redo: lost left sibling?

2004-08-17 Thread Andrew Sukow
Gentoo
Postgres V 7.4.3
Freshly recompiled postgres and compiler

Thanks

Andrew

- Original Message -
From: Bruce Momjian [EMAIL PROTECTED]
Date: Tuesday, August 17, 2004 10:09 am
Subject: Re: [GENERAL] PANIC: btree_split_redo: lost left sibling?

 
 Please provide a PostgreSQL version and operating system information.
 
 ---
 
 
 Andrew Sukow wrote:
  Greetings,
  
  Our postgres system crashed and upon restarting it our database 
 had the following errors.  The error log was 4.5 gigs which is 
 much larger than usual.  We looked online for information about 
 lost left siblings and how to fix the data and not lose the 400 
 million records we have.  Anyone have an idea what's the matter 
 and what the fix is?
  
  LOG:  database system was interrupted while in recovery at 2004-
 08-17 08:59:41 PDT
  HINT:  This probably means that some data is corrupted and you 
 will have to use the last backup for recovery.
  LOG:  checkpoint record is at 326/C007B778
  LOG:  redo record is at 326/BD899570; undo record is at 0/0; 
 shutdown FALSE
  LOG:  next transaction ID: 46922114; next OID: 133662911
  LOG:  database system was not properly shut down; automatic 
 recovery in progress
  LOG:  redo starts at 326/BD899570
  PANIC:  btree_split_redo: lost left sibling
  LOG:  startup process (PID 9038) was terminated by signal 6
  LOG:  aborting startup due to startup process failure
  
  Thanks,
  
  Andrew
  
  
  
  ---(end of broadcast)
 ---
  TIP 4: Don't 'kill -9' the postmaster
  
 
 -- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, 
 Pennsylvania 19073
 


---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] PANIC: btree_split_redo: lost left sibling?

2004-08-17 Thread Gavin M. Roy
Note that I have had a few segfaults on gentoo, pg v7.4.3, amd64, kernel 
2.6.5-gentoo-r1 as well.

Gavin
Andrew Sukow wrote:
Gentoo
Postgres V 7.4.3
Freshly recompiled postgres and compiler
Thanks
Andrew
- Original Message -
From: Bruce Momjian [EMAIL PROTECTED]
Date: Tuesday, August 17, 2004 10:09 am
Subject: Re: [GENERAL] PANIC: btree_split_redo: lost left sibling?
 

Please provide a PostgreSQL version and operating system information.
---

Andrew Sukow wrote:
   

Greetings,
Our postgres system crashed and upon restarting it our database 
 

had the following errors.  The error log was 4.5 gigs which is 
much larger than usual.  We looked online for information about 
lost left siblings and how to fix the data and not lose the 400 
million records we have.  Anyone have an idea what's the matter 
and what the fix is?
   

LOG:  database system was interrupted while in recovery at 2004-
 

08-17 08:59:41 PDT
   

HINT:  This probably means that some data is corrupted and you 
 

will have to use the last backup for recovery.
   

LOG:  checkpoint record is at 326/C007B778
LOG:  redo record is at 326/BD899570; undo record is at 0/0; 
 

shutdown FALSE
   

LOG:  next transaction ID: 46922114; next OID: 133662911
LOG:  database system was not properly shut down; automatic 
 

recovery in progress
   

LOG:  redo starts at 326/BD899570
PANIC:  btree_split_redo: lost left sibling
LOG:  startup process (PID 9038) was terminated by signal 6
LOG:  aborting startup due to startup process failure
Thanks,
Andrew

---(end of broadcast)
 

---
   

TIP 4: Don't 'kill -9' the postmaster
 

--
Bruce Momjian|  http://candle.pha.pa.us
[EMAIL PROTECTED]   |  (610) 359-1001
+  If your life is a hard drive, |  13 Roberts Road
+  Christ can be your backup.|  Newtown Square, 
Pennsylvania 19073

   


---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org
 


---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [GENERAL] Autoincremental value

2004-08-17 Thread Pierre-Frdric Caillaud
Suppose your table is like :
key1key2
1   1
1   2
2   1
To get the next value to insert for key1=1 you can do this :
SELECT key2 FROM ... WHERE key1=1 ORDER BY key2 DESC LIMIT 1
Of course a UNIQUE INDEX on key1, key2 helps.
	You won't be protected from two transactions adding the same value at the  
same time, though. The unique index will catch them and one of them will  
fail (constraint violation etc). Just retry the transaction until it  
works... or, be a warrior and lock the table... but if you do that, please  
do it in a function/trigger so that it's not kept locked for long !

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
 subscribe-nomail command to [EMAIL PROTECTED] so that your
 message can get through to the mailing list cleanly


Re: [GENERAL] Web application: Programming language/Framework

2004-08-17 Thread Pierre-Frdric Caillaud
	By weak, I meant lack of expressive power, not weakly supported.  
That PHP has a huge community is obvious. It's everywhere. The list of  
broken things in PHP is too long to mention, just think about namespaces  
for instance. I have no bad feelings towards people who use PHP, rather I  
wonder why so many people waste their time with such a badly designed  
tool. I did not intend to be discourteous, my excuses if I was, rather, I  
wanted to help the OP out of the PHP mess.
	I have had to code in PHP and always hated it.

I know this is off-topic so... snip.
On Tue, 17 Aug 2004 11:15:18 -0300, Gustavo Franklin Nóbrega - PLANAE  
[EMAIL PROTECTED] wrote:

Off course PHP is a very weak language... Is than weak that SF.net have  
9144 PHP projects  and 3292 Python projects. Python is a very good  
language, but is discourteous (or that is a signal of knowledge lack) to  
speak that 'php is a very weak language', when knows that exist so many  
PHP programmers in this list.  Futhermore,  this  subject is not  part  
of this list.
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


[GENERAL] (S)RPMS for 7.4.4 released.

2004-08-17 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi,

For RPM users, (S)RPMS for 7.4.4 was just built. We have (S)RPMS for:

 * Red Hat Linux 9
 * Fedora Core 1
 * Fedora Core 2
 * Red Hat Enterprise Linux 3

They will be available in main ftp site shortly, and in the mirrors after 
the sync.

I've tested and installed all the rpms in production machines. If you find 
out any problems with the RPMS, please do mail me.

Regards,
- -- 
Devrim GUNDUZ  
devrim~gunduz.org   devrim.gunduz~linux.org.tr 
http://www.tdmsoft.com
http://www.gunduz.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBIlXUtl86P3SPfQ4RAvpMAJ0V75S2u0RAKbgrxOgcO9ubfzAvwQCdFB+l
QrY8J6JbpA2CHi9JO2myENQ=
=c/TH
-END PGP SIGNATURE-


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] PANIC: btree_split_redo: lost left sibling?

2004-08-17 Thread Tom Lane
Andrew Sukow [EMAIL PROTECTED] writes:
 Our postgres system crashed and upon restarting it our database had the following 
 errors.  The error log was 4.5 gigs which is much larger than usual.  We looked 
 online for information about lost left siblings and how to fix the data and not lose 
 the 400 million records we have.  Anyone have an idea what's the matter and what the 
 fix is?

 PANIC:  btree_split_redo: lost left sibling

Looking at the code, the most probable explanation seems to be that the
WAL log contains a reference to a btree page that doesn't exist on disk
(ie, the index file on disk is too short to contain that page number).
The code is panicing because it expects that page should exist already.
I have to agree with it --- it would seem you are suffering from
filesystem misfeasance.  Are you close to being out of disk space
by any chance?

What I would suggest doing is modifying the error message (it's in 
src/backend/access/nbtree/nbtxlog.c, about line 256 in 7.4) to report
the index's DB/relfileno and the block number it's failing to access.
Or if you built with debug enabled, you could gdb the core dump and
extract those numbers that way.  Knowing the file and the length it
needs to be, you could append zeroes to the file to make it long enough,
and then the replay should succeed.

A quicker-and-dirtier solution is to pass extend = true instead of false
to the XLogReadBuffer just above this, but I counsel doing the file
extensions manually as sketched above, so that you will know exactly
which index(es) have got this problem.  If I were doing this I would
certainly want to manually REINDEX those indexes afterwards.  The
specific page that's being requested will be filled in correctly from
the WAL entry, but who knows what else is wrong elsewhere in the index?

BTW, what do you mean by the error log was 4.5 gigs?  What you showed
us was only 10 lines.

regards, tom lane

---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Does a 'stable' deferred trigger execution order exist? - answer: yes

2004-08-17 Thread Frank van Vugt
  Any execution order for regular triggers would be as good as any other
 This is perhaps true for cleanly designed applications, but people
 have requested that we nail down the execution order, and we have
 responded by specifying that it's alphabetical within an event.

I understand and actually meant to say that since nothing should 'depend' on 
any particular order, executing these triggers alphabetically seems a logical 
approach with the extra bonus you mention.

 The intention was certainly to apply this to AFTER as well
 as BEFORE triggers.  We'll need to look and see why it's not working.

Just to avoid any misunderstandings:

- regular triggers DO execute in alphabetical order

- it's the deferred triggers that execute per event in order of definition

  at least the sets itself are executed in the same order as the original
  events they fired upon.
 Right.  This is handled by appending new pending-trigger events to a
 global list when they are detected.  Barring oddities such as different
 deferral specifications, they should be executed in order of detection.

That's the big 'YES' I was looking for ;-) Thanks.

 I would have expected triggers for the same event to be inserted in
 alphabetical order ...

Yep, me too, but apart from the fact that I'm o.k. with the way it currently 
works, I imagine this is not exactly a high-priority issue right now ;-)


Thanks again for the replies.



-- 
Best,




Frank.


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [GENERAL] shared_buffers Question

2004-08-17 Thread Joe Lester
Thanks for the suggestion Scott. I did a...

find / -type f -size +10 -print

The results contained 9 Gig! of swap files:
/private/var/vm/swapfile0
/private/var/vm/swapfile1
/private/var/vm/swapfile10
 [plus many more entries]

That seems to indicate to me a memory leak of some sort. My symptoms mirror almost exactly those of this fellow, who's thread was never resolved as far as I can see:

http://archives.postgresql.org/pgsql-bugs/2004-06/msg00013.php

Anyone have any other suggestions on what to look for? At this rate I'm leaking about 2 to 4 Gigs of memory (swap) per week. I'm running postgres 7.4.1 on an 700MHz eMac, 512MB RAM, OS 10.3.2. Thanks.

> Scott Ribe:
> Also check to make sure that some rogue process somewhere isn't filling your
> hard disk with some huge log file. I don't remember the UNIX commands
> offhand, but you should sudo a search starting in / for all large files, say

Joe's Original Message:
I've been running a postgres server on a Mac (10.3, 512MB RAM) with 200 clients connecting for about 2 months without a crash. However just yesterday the database and all the clients hung. When I looked at the Mac I'm using as the postgres server it had a window up that said that there was no more disk space available to write memory too. I ended up having to restart the whole machine. I would like to configure postgres so that is does not rely so heavily on disk-based memory but, rather, tries to stay within the scope of the 512MB of physical memory in the Mac.

[GENERAL] pg_dump feature request: Exclude tables?

2004-08-17 Thread Glen Parker
Since pg_dump will be allowing multiple -t table parameters for 8.0, here
is a related feature request.

A similar option (allowing multiples also) to EXCLUDE tables, so we can do a
dump of the entire database minus a few tables.

Glen Parker
[EMAIL PROTECTED]


---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[GENERAL] Problem analyzing performance of query

2004-08-17 Thread Greg Stark

I have a query that is taking too long when run from a larger plpgsql function
(40-50s). However when I explain analyze it under psql it runs fine (4-5s).
This is with the same parameters, and I've even tried embedding the parameters
inside a subquery to avoid letting the planner see any more info than normal.

Is there any way to ask the server what plan it's using when it's actually
executing the query in production, rather than trying to feed it the same
query later in another context and hope it gets the same result?

-- 
greg


---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] pg_dump feature request: Exclude tables?

2004-08-17 Thread Bruce Momjian
Glen Parker wrote:
 Since pg_dump will be allowing multiple -t table parameters for 8.0, here
 is a related feature request.

Nope, didn't make it into 8.0.

 A similar option (allowing multiples also) to EXCLUDE tables, so we can do a
 dump of the entire database minus a few tables.

Yes, we have talked about that.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  [EMAIL PROTECTED]   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 8: explain analyze is your friend


[GENERAL] Fw: libpq or Embedded SQL in C

2004-08-17 Thread Thuan Truong




All,

I need to upload (insert) a flat file to PostgresSQL DB (on 
Solaris 9) using C. I wonder if I should use libpq functions or embedded 
SQL in C (libecpg). Any help is appreciated. If you have any sample 
programs, please send along.

Thanks,
AndyTruong



Re: [GENERAL] apple uses Postgres for RemoteDesktop 2

2004-08-17 Thread Randal L. Schwartz
 Tom == Tom Lane [EMAIL PROTECTED] writes:

Tom Yikes.  They need to get off of that badly broken PG version, too :-(
Tom 7.3.3 was about the worst choice they could have made in the past
Tom several years ...

At least they make a habit of that.  If I recall correctly, OSX 10.1
and 10.2 froze in a bad beta of Perl 5.6.0 prerelease.  Now it's been
updated to at least a normal release (5.8.1, still a year behind, but
that's life).

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] Web application: Programming language/Framework

2004-08-17 Thread Chris Travers
Just a little on the history of the tools might be helpful.  I think 
that these environments are easy to criticize by people who are not 
really aware of what the tools are really good for.

PHP:
This is worth noting in the context of this thread though fairly 
off-topic for the list.

PHP was designed initially to be a sort of preprocessor for arbitrary 
document types.  I don't really use it for much system scripting (Perl 
is better for that) but for web applications, it works extremely well.  
After all, most of your content may be static, and you are really 
interested in modifying the static content by preprocessing it.

I prefer PHP because it can easily be embedded in arbitrary document 
types and used to modify them.  I am starting to use it more and more 
for LaTeX documents as well (though I have some automated tools which 
can do more simple manupulations using Perl).  This is what the tool is 
designed for.

Complaining about PHP's namespaces seems to me to be complaining about 
the fact that a crescent wrench doesn't pound nails very well  Not 
that you can't pound nails with a crescent wrench but there are more 
efficient ways to do it.

Perl:
Perl was originally designed as a tool for processing text files on a 
UNIX system.  Bear in mind that this is an incredibly useful concept as 
everything is a file :-).  It is also designed to take the information 
and generate reports.  So early on, people discovered that Perl made a 
pretty useful CGI programming environment because these tools make it 
easy to generate HTML.  Like PHP, it has an extensive community and a 
lot of add-on modules.  However, it is fundamentally different.

For an extremely complex web app I might consider using Perl if I needed 
some sort of exotic functionality, like Kerberos integration.  Such is 
usuallly cleaner than PHP extensions.

Perl also makes a wonderful language for automates system administration 
tasks because of its text parsing capabilities and the fact that these 
are integrated into the language as operators rather than functions.

Python:
Python is a generic programming environment.  I really like it where I 
am not doing automated document preparation, or where I need something 
far more general than automated document generation (PHP or Perl).  In 
general, I prefer Python for interactive (non-web) applications.

Each of these environments has good PostgreSQL support.
Pierre-Frédéric Caillaud wrote:
By weak, I meant lack of expressive power, not weakly 
supported.  That PHP has a huge community is obvious. It's 
everywhere. The list of  broken things in PHP is too long to mention, 
just think about namespaces  for instance. I have no bad feelings 
towards people who use PHP, rather I  wonder why so many people waste 
their time with such a badly designed  tool. I did not intend to be 
discourteous, my excuses if I was, rather, I  wanted to help the OP 
out of the PHP mess.
I have had to code in PHP and always hated it.

I know this is off-topic so... snip.
On Tue, 17 Aug 2004 11:15:18 -0300, Gustavo Franklin Nóbrega - PLANAE  
[EMAIL PROTECTED] wrote:

Off course PHP is a very weak language... Is than weak that SF.net 
have  9144 PHP projects  and 3292 Python projects. Python is a very 
good  language, but is discourteous (or that is a signal of knowledge 
lack) to  speak that 'php is a very weak language', when knows that 
exist so many  PHP programmers in this list.  Futhermore,  this  
subject is not  part  of this list.

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


[GENERAL] indexed column not working as fast as expected

2004-08-17 Thread Amir Zicherman
hi,

i have a btree index on col1 in table1.  The column has either values
1,2,3, or 4.  4 does not appear that much in the table (only 5 times).
there are about 20 million rows in the table.  when i do a select *
from table1 where col1=4 it takes very long time to get back to me
(around 4 minutes).  why is it taking so long if i have an index on
it?  I also tried this with a hash index and it was still slow.

thanx, amir

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] Fw: libpq or Embedded SQL in C

2004-08-17 Thread Dann Corbit
Title: Message



You 
may be able to use the COPY command, which would probably be a lot 
faster.
http://techdocs.postgresql.org/techdocs/usingcopy.php


There 
are sample programs in the INTERFACES subdirectory for each of the interface 
types.

  
  -Original Message-From: 
  [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  On Behalf Of Thuan TruongSent: Tuesday, August 17, 2004 2:42 
  PMTo: [EMAIL PROTECTED]Subject: [GENERAL] Fw: 
  libpq or Embedded SQL in C
  
  All,
  
  I need to upload (insert) a flat file to PostgresSQL DB (on 
  Solaris 9) using C. I wonder if I should use libpq functions or embedded 
  SQL in C (libecpg). Any help is appreciated. If you have any 
  sample programs, please send along.
  
  Thanks,
  AndyTruong
  


Re: [GENERAL] indexed column not working as fast as expected

2004-08-17 Thread Glen Parker
Did you do an explain?  I'd guess the index isn't being used because of
skewed statistics.

 i have a btree index on col1 in table1.  The column has either values
 1,2,3, or 4.  4 does not appear that much in the table (only 5 times).
 there are about 20 million rows in the table.  when i do a select *
 from table1 where col1=4 it takes very long time to get back to me
 (around 4 minutes).  why is it taking so long if i have an index on
 it?  I also tried this with a hash index and it was still slow.


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])