Re: [GENERAL] Links to Replication

2011-08-24 Thread tuanhoanganh
You can use SymmetricDS to replicate on PostgreSQL, Oracle, SQL Server database. On Thu, Aug 25, 2011 at 11:07 AM, Shoaib Mir wrote: > On Thu, Aug 25, 2011 at 2:03 PM, Adarsh Sharma > wrote: > >> Dear all, >> >> I am using PostgresPlus-8.4SS version of Postgres on Linux & Windows >> Systems. >

Re: [GENERAL] Links to Replication

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 2:03 PM, Adarsh Sharma wrote: > Dear all, > > I am using PostgresPlus-8.4SS version of Postgres on Linux & Windows > Systems. > Now I need to enable replication of two servers. OS may be same or > different. > > Please let me know any useful links to do that. > I am not re

[GENERAL] Links to Replication

2011-08-24 Thread Adarsh Sharma
Dear all, I am using PostgresPlus-8.4SS version of Postgres on Linux & Windows Systems. Now I need to enable replication of two servers. OS may be same or different. Please let me know any useful links to do that. Thanks -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Ondrej Ivanič
Hi, On 25 August 2011 11:17, Toby Corkindale wrote: > Do I need to make sure I re-create every index on every child table I > create? > That would be.. annoying, at best. Yes, it is little bit annoying but I like it. You don't need any index on parent table but you have to create them "manually"

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Toby Corkindale
On 25/08/11 12:10, Shoaib Mir wrote: On Thu, Aug 25, 2011 at 11:57 AM, Toby Corkindale mailto:toby.corkind...@strategicdata.com.au>> wrote: It seems messy to inherit the columns but not the indexes or checks upon them :( Yes it can be a bit annoying at timse but you can try to automa

Re: [GENERAL] Collapsing multiple subqueries into one

2011-08-24 Thread Royce Ausburn
On 24/08/2011, at 4:44 PM, Chris Hanks wrote: > Thanks Royce. I put together another query using a WITH statement > that's also working: > > WITH v AS ( > SELECT item_id, type, direction, array_agg(user_id) as user_ids > FROM votes > WHERE root_id = 5305 > GROUP BY type, direction, item_id >

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 11:57 AM, Toby Corkindale < toby.corkind...@strategicdata.com.au> wrote: > > It seems messy to inherit the columns but not the indexes or checks upon > them :( > > > Yes it can be a bit annoying at timse but you can try to automate the whole process as well. Like I found th

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Toby Corkindale
On 25/08/11 11:34, Shoaib Mir wrote: On Thu, Aug 25, 2011 at 11:17 AM, Toby Corkindale mailto:toby.corkind...@strategicdata.com.au>> wrote: Do I need to make sure I re-create every index on every child table I create? That would be.. annoying, at best. Is there a way to enable

Re: [GENERAL] Indexes on inheriting tables

2011-08-24 Thread Shoaib Mir
On Thu, Aug 25, 2011 at 11:17 AM, Toby Corkindale < toby.corkind...@strategicdata.com.au> wrote: > > Do I need to make sure I re-create every index on every child table I > create? > That would be.. annoying, at best. > > Is there a way to enable inheritance of indexes too? > > You do not need an

[GENERAL] Indexes on inheriting tables

2011-08-24 Thread Toby Corkindale
Hi, I'm using Pg 9.0 and inheritance to do table partitioning. A simple example would be: CREATE TABLE foo ( id INTEGER PRIMARY KEY, thing VARCHAR(32) ); CREATE INDEX foo_thing_idx ON foo(thing); CREATE TABLE foo_1 () INHERITS (foo); I read that foreign key constraints wouldn't be inherited

Re: [GENERAL] how is max_fsm_pages configured in 8.4

2011-08-24 Thread mark
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Martín Marqués > Sent: Wednesday, August 24, 2011 2:48 PM > To: pgsql-general > Subject: [GENERAL] how is max_fsm_pages configured in 8.4 > > I see that max_fsm_pag

[GENERAL] how is max_fsm_pages configured in 8.4

2011-08-24 Thread Martín Marqués
I see that max_fsm_pages isn't there anymore in postgresql.conf from 8.4. Why is it? And can it be configured, or is it something we should not worry about? -- Martín Marqués select 'martin.marques' || '@' || 'gmail.com' DBA, Programador, Administrador -- Sent via pgsql-general mailing list (p

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread Adrian Klaver
On 08/24/2011 10:06 AM, c k wrote: No, I have added the python directory in the PATH. Another thing is I created another language plpython2u and succeeded. Still I will try to figure out the problem. How did you create plpythonu2? Define succeed; the language was created or the languag

Re: [GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread bricklen
On Wed, Aug 24, 2011 at 1:16 PM, Tom Lane wrote: > I agree you probably don't want to poke at this in your production > instance, but you could create a playpen instance (separate data > directory, nondefault port number) using the same executables and > then do your testing there.  If you didn't

Re: [GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread Tom Lane
bricklen writes: > On Wed, Aug 24, 2011 at 12:11 PM, Alex Hunsaker wrote: >> Hrm, do simple plperlu functions break it? > IIRC, plperl(u) was installed via yum at the same time the db was > upgraded to 9.0.x. It is possible there is more than one Perl version > installed, or that the original Pe

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread Tom Lane
Scott Marlowe writes: > On Wed, Aug 24, 2011 at 1:37 PM, Merlin Moncure wrote: >> be worked around without *too* much effort, justifies running a known >> broken > Anything before 8.2 is considered broken, unfixable, not going to be > fixed as far as windows is concerned. Actually, anything bef

Re: [GENERAL] PL/pgSQL trigger and sequence increment

2011-08-24 Thread Tom Lane
jon...@xmission.com writes: > Greetings. I noticed an interesting behavior when using a PL/pgSQL > trigger. I'm running PostgreSQL 8.3. The trigger function checks a > newly inserted or updated row for a type of uniqueness. Specifically, > each row in the table has a submitter id and an e

Re: [GENERAL] "OLD." || myColumnNameVar (How to generically access columns in a trigger's OLD or NEW records)

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 1:03 PM, ivan_14_32 wrote: > 01.05.2011 12:58, Basil Bourque wrote: >> >> Hoorah! I was able to complete my single PL/pgSQL function to create >> history records tracking individual field value changes generically for all >> my tables. Some developers call this an "audit tr

Re: [GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread bricklen
On Wed, Aug 24, 2011 at 12:11 PM, Alex Hunsaker wrote: > Hrm, do simple plperlu functions break it? I can't tell from your > report if plperlu seems completely broken or if something in your > quoted function seems to be the culprit. > > If > CREATE OR REPLACE FUNCTION plperlu_noop() returns void

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread Scott Marlowe
On Wed, Aug 24, 2011 at 1:37 PM, Merlin Moncure wrote: > be worked around without *too* much effort, justifies running a known > broken Anything before 8.2 is considered broken, unfixable, not going to be fixed as far as windows is concerned. -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Problem with 8.3.14 Windows binaries

2011-08-24 Thread Pete Wall
Any ideas? Has anybody else had luck or problems with the new versions on Windows Server 2003? Thanks, -Pete From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Pete Wall Sent: Thursday, August 18, 2011 4:58 PM To: pgsql-general@postgresql.org Subj

[GENERAL] PL/pgSQL trigger and sequence increment

2011-08-24 Thread jonesd
Greetings. I noticed an interesting behavior when using a PL/pgSQL trigger. I'm running PostgreSQL 8.3. The trigger function checks a newly inserted or updated row for a type of uniqueness. Specifically, each row in the table has a submitter id and an entry timestamp. No two rows can h

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 2:23 PM, John R Pierce wrote: > On 08/24/11 12:14 PM, Merlin Moncure wrote: >> >> OP -- take a database dump ASAP and migrate to either 8.2 or 9.0. > > one caveat, 8.4 (and 9.0) tightened up considerably the rules for implicit > typecasting as there were a number of serious

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread John R Pierce
On 08/24/11 12:14 PM, Merlin Moncure wrote: OP -- take a database dump ASAP and migrate to either 8.2 or 9.0. one caveat, 8.4 (and 9.0) tightened up considerably the rules for implicit typecasting as there were a number of serious ambiguities in the sloppy way it was done before so code w

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 2:08 PM, Raymond O'Donnell wrote: > On 24/08/2011 19:53, Mcleod, John wrote: >> Hello all, >> >> Don't shoot me, I'm just the fella sweeping up after a departure. >> >> I'm supporting a web site with mapping features using Mapserver and >> PostgreSql 7.5 for windows. > > Th

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread Raymond O'Donnell
On 24/08/2011 19:53, Mcleod, John wrote: > C:\ms4w\apps\pgsql75win>cd c:\ > > C:\>cd ms4w/apps/pgsql75win/data/ > > C:\ms4w\apps\pgsql75win\data>del postmaster.pid > > Could Not Find C:\ms4w\apps\pgsql75win\data\postmaster.pid > > LOG: database system was shut down at 2011-08-24 17:30:14 Eastern

Re: [GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread Alex Hunsaker
On Wed, Aug 24, 2011 at 12:32, bricklen wrote: > On Wed, Aug 24, 2011 at 11:28 AM, Tom Lane wrote: >> I wonder if there is something wonky about your Perl installation. > > I tested originally on two other 9.0.4 databases and there were no > issues at all. I'll have to assume that you are correct

Re: [GENERAL] What is postgresql status?

2011-08-24 Thread Raymond O'Donnell
On 24/08/2011 19:53, Mcleod, John wrote: > Hello all, > > Don't shoot me, I'm just the fella sweeping up after a departure. > > I'm supporting a web site with mapping features using Mapserver and > PostgreSql 7.5 for windows. There never was a PostgreSQL 7.5 release - it was changed to 8.0 at so

[GENERAL] What is postgresql status?

2011-08-24 Thread Mcleod, John
Hello all, Don't shoot me, I'm just the fella sweeping up after a departure. I'm supporting a web site with mapping features using Mapserver and PostgreSql 7.5 for windows. Recently, my mapping features went down. Error messages that display are the following... Warning: pg_query(): Query failed

Re: [GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread bricklen
On Wed, Aug 24, 2011 at 11:28 AM, Tom Lane wrote: > bricklen writes: >> I was just testing a simple plperlu function to return the existence >> of a directory and as soon I pasted the function into psql and hit >> Enter, I got the following crash: > > FWIW, this function seems to work fine for me

Re: [GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread Tom Lane
bricklen writes: > I was just testing a simple plperlu function to return the existence > of a directory and as soon I pasted the function into psql and hit > Enter, I got the following crash: FWIW, this function seems to work fine for me in 9.0.4 on a Fedora 14 x86_64 box ... and there haven't b

Re: [GENERAL] Feature Request: DDL + RegExp - definitions

2011-08-24 Thread Tom Lane
Merlin Moncure writes: > On Wed, Aug 24, 2011 at 11:30 AM, Richard Broersma >> The following email illustrates the behavior that is undesirable (to me). >> http://www.mail-archive.com/pgadmin-support@postgresql.org/msg11482.html > this is IMO not a feature, but a bug. No, it's not a bug, it's ju

Re: [GENERAL] "OLD." || myColumnNameVar (How to generically access columns in a trigger's OLD or NEW records)

2011-08-24 Thread ivan_14_32
01.05.2011 12:58, Basil Bourque wrote: Hoorah! I was able to complete my single PL/pgSQL function to create history records tracking individual field value changes generically for all my tables. Some developers call this an "audit trail", though an accountant might say otherwise. I made auditi

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread John R Pierce
On 08/24/11 10:33 AM, c k wrote: Server and client both are a single machine. that doesn't answer my question. PATH, like other environment variables, is specific to the process. just because you change the default path of your login account via $HOME/.profile or whatever, doesn't have any

Re: [GENERAL] Streaming Replication: Observations, Questions and Comments

2011-08-24 Thread Alan Hodgson
On August 24, 2011 08:33:17 AM Samba wrote: > One strange thing I noticed is that the pg_xlogs on the master have > outsized the actual data stored in the database by at least 3-4 times, > which was quite surprising. I'm not sure if 'restore_command' has anything > to do with it. I did not understa

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread c k
Server and client both are a single machine. Chaitanya Kulkarni On Wed, Aug 24, 2011 at 10:47 PM, John R Pierce wrote: > On 08/24/11 10:06 AM, c k wrote: > >> I have added the python directory in the PATH. Another thing is I created >> another language plpython2u and succeeded. Still I will try

Re: [GENERAL] Feature Request: DDL + RegExp - definitions

2011-08-24 Thread Richard Broersma
On Wed, Aug 24, 2011 at 10:14 AM, Merlin Moncure wrote: > this is IMO not a feature, but a bug. Would the feature I'm requesting be a bug or is it the current behavior that would be considered a bug? -- Regards, Richard Broersma Jr. -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread John R Pierce
On 08/24/11 10:06 AM, c k wrote: I have added the python directory in the PATH. Another thing is I created another language plpython2u and succeeded. Still I will try to figure out the problem. is it in the PATH that the server is using? the server doesn't know or care anything about the cl

Re: [GENERAL] Feature Request: DDL + RegExp - definitions

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 11:30 AM, Richard Broersma wrote: > It'd be nice if the catalog entries that store the DDL constraints > definitions and view definitions with regular expressions strings > would preserved any escape string syntax (i.e.E) for RegExp > backslashes. > > For example, PGAdmin u

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread c k
No, I have added the python directory in the PATH. Another thing is I created another language plpython2u and succeeded. Still I will try to figure out the problem. Regards, Chaitanya Kulkarni On Wed, Aug 24, 2011 at 7:11 PM, Adrian Klaver wrote: > On Tuesday, August 23, 2011 11:10:19 pm c k wr

Re: [GENERAL] Explain Analyze understanding

2011-08-24 Thread John R Pierce
On 08/24/11 9:18 AM, Carlos Henrique Reimer wrote: I need to improve performance for a particular SQL command but facing difficulties to understand the explain results. you're joining like 50 tables in nested selects, getting 200 rows, and its only taking 3.5 seconds? where's the problem?

[GENERAL] Feature Request: DDL + RegExp - definitions

2011-08-24 Thread Richard Broersma
It'd be nice if the catalog entries that store the DDL constraints definitions and view definitions with regular expressions strings would preserved any escape string syntax (i.e.E) for RegExp backslashes. For example, PGAdmin uses these catalog entries to produce Create or Replace scripts to that

Re: [GENERAL] Streaming Replication: Observations, Questions and Comments

2011-08-24 Thread Greg Smith
On 08/24/2011 11:33 AM, Samba wrote: One strange thing I noticed is that the pg_xlogs on the master have outsized the actual data stored in the database by at least 3-4 times, which was quite surprising. I'm not sure if 'restore_command' has anything to do with it. I did not understand why tran

[GENERAL] plperlu function caused a segmentation fault

2011-08-24 Thread bricklen
I was just testing a simple plperlu function to return the existence of a directory and as soon I pasted the function into psql and hit Enter, I got the following crash: CREATE OR REPLACE FUNCTION does_directory_exist(p_path_and_directory TEXT, OUT does_it_exist TEXT) RETURNS TEXT AS $BODY$ my $p

Re: [GENERAL] init script or procedure

2011-08-24 Thread andreas
No, that's not possible. Zitat von "Gauthier, Dave" : Does PG support the use of an init script or procedure? I'm looking for something that'll run unconditionally every time someone makes a DB connection. This script will create a temp table and stuff some data in it for general use wit

Re: [GENERAL] question regarding full_page_write

2011-08-24 Thread Greg Smith
On 08/24/2011 11:12 AM, Martín Marqués wrote: Why aren't deltas good enough for the first 8Kb? Is there other information in the first 8Kb that make those more important? The fundamental problem is what's called a torn page. You write out a 8K page; only part of it actually makes it to di

[GENERAL] Explain Analyze understanding

2011-08-24 Thread Carlos Henrique Reimer
Hi, I need to improve performance for a particular SQL command but facing difficulties to understand the explain results. Is there somewhere a tool could help on this? I've stored the SQL code and corresponding explain analyze at SQL: http://www.opendb.com.br/v1/sql.txt Explain: http://www.open

Re: [GENERAL] init script or procedure

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 10:06 AM, Pavel Stehule wrote: >> [snip] >>> . This is not task for server, >> >> I disagree.  Other databases have them (see >> http://msdn.microsoft.com/en-us/library/bb326598.aspx), and they are >> highly used and useful. > > other databases has own integrated connection

[GENERAL] Streaming Replication: Observations, Questions and Comments

2011-08-24 Thread Samba
Hi all, We have a postgres-9.0 streaming replication set up where we keep the WAL segments on the master amounting to 10 GB so that we can survive longer periods of disconnect between master and slave. We do not use any shared storage space for archiving WAL logs. (the shared disk server may turn

Re: [GENERAL] question regarding full_page_write

2011-08-24 Thread Martín Marqués
El día 22 de agosto de 2011 18:39, Greg Smith escribió: > On 08/22/2011 05:07 PM, Martín Marqués wrote: >> >> My question regarding your answer is, why is it important for the >> first page after a checkpoint and not on other page writes? >> > > The first time a page is written after a checkpoint,

Re: [GENERAL] init script or procedure

2011-08-24 Thread Pavel Stehule
2011/8/24 Merlin Moncure : > On Wed, Aug 24, 2011 at 9:51 AM, Pavel Stehule > wrote: >> 2011/8/24 Merlin Moncure : >>> On Wed, Aug 24, 2011 at 9:30 AM, Pavel Stehule >>> wrote: Hello 2011/8/24 Gauthier, Dave : > Does PG support the use of an init script or procedure?  I'm loo

Re: [GENERAL] init script or procedure

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 9:51 AM, Pavel Stehule wrote: > 2011/8/24 Merlin Moncure : >> On Wed, Aug 24, 2011 at 9:30 AM, Pavel Stehule >> wrote: >>> Hello >>> >>> 2011/8/24 Gauthier, Dave : Does PG support the use of an init script or procedure?  I'm looking for something that'll run unc

Re: [GENERAL] init script or procedure

2011-08-24 Thread Pavel Stehule
2011/8/24 Merlin Moncure : > On Wed, Aug 24, 2011 at 9:30 AM, Pavel Stehule > wrote: >> Hello >> >> 2011/8/24 Gauthier, Dave : >>> Does PG support the use of an init script or procedure?  I'm looking for >>> something that'll run unconditionally every time someone makes a DB >>> connection.  This

Re: [GENERAL] strange exclusive lock in relation --- ideas

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 9:11 AM, MirrorX wrote: > hello all, > > i came with a strange finding the other day and i would appreciate any ideas > on the matter (if any). while checking on the locks of the server i found a > tuple indicating that a prepared transaction had requested an exclusive lock

Re: [GENERAL] init script or procedure

2011-08-24 Thread Merlin Moncure
On Wed, Aug 24, 2011 at 9:30 AM, Pavel Stehule wrote: > Hello > > 2011/8/24 Gauthier, Dave : >> Does PG support the use of an init script or procedure?  I'm looking for >> something that'll run unconditionally every time someone makes a DB >> connection.  This script will create a temp table and s

Re: [GENERAL] init script or procedure

2011-08-24 Thread Pavel Stehule
Hello 2011/8/24 Gauthier, Dave : > Does PG support the use of an init script or procedure?  I'm looking for > something that'll run unconditionally every time someone makes a DB > connection.  This script will create a temp table and stuff some data in it > for general use within that session. >

[GENERAL] init script or procedure

2011-08-24 Thread Gauthier, Dave
Does PG support the use of an init script or procedure? I'm looking for something that'll run unconditionally every time someone makes a DB connection. This script will create a temp table and stuff some data in it for general use within that session. Thanks in Advance for any help!

[GENERAL] strange exclusive lock in relation --- ideas

2011-08-24 Thread MirrorX
hello all, i came with a strange finding the other day and i would appreciate any ideas on the matter (if any). while checking on the locks of the server i found a tuple indicating that a prepared transaction had requested an exclusive lock on a relation. in general, i am aware of the situations w

Re: [GENERAL] postgresql server crash on windows 7 when using plpython

2011-08-24 Thread Adrian Klaver
On Tuesday, August 23, 2011 11:10:19 pm c k wrote: > Yes, > ImportError: No module named site > ImportError: No module named site > ImportError: No module named site > > This last line is added every time I call any plpython function. Here is > the simple plpython function. > > CREATE OR REPLACE

Re: [GENERAL] date_trunc - not sure what is wrong, but it confuses me.

2011-08-24 Thread dexdyne
thanks. I hadn't used psql before, PgAdmin had been all I needed. You are right, \df does give the full info, and I do believe the manual isn't clear enough. TVM David -- View this message in context: http://postgresql.1045698.n5.nabble.com/date-trunc-not-sure-what-is-wrong-but-it-confuses-me-

Re: [GENERAL] Connection Error during Pg_restore

2011-08-24 Thread Rebecca Clarke
That worked thank you On Wed, Aug 17, 2011 at 1:01 PM, raghu ram wrote: > > > On Wed, Aug 17, 2011 at 4:32 PM, Rebecca Clarke wrote: > >> Hi there >> >> I'm doing a restore of a large table. The backup file is 18gb. When I run >> the restore after sometime it comes up with this error while it is

Re: [GENERAL] JDBC Connection Errors

2011-08-24 Thread Thomas Markus
Hi, - check for open server socket: netstat -tulpen | grep postgres - try to force ipv4 for java with system property (a recent jre prefers ipv6): -Djava.net.preferIPv4Stack=true regards Thomas Am 24.08.2011 00:47, schrieb Sam Nelson: Hi list, A client is hitting an issue with JDBC: org.pos