Re: [GENERAL] help me to clear postgres problem

2013-03-26 Thread dinesh kumar
IIRC, service failure creates some event logs information in windows. And also you can verify the bit rock installer log files from %TEMP% location. Regards, Dinesh manojadinesh.blogspot.com On Mon, Mar 25, 2013 at 5:05 PM, jayaram s 123jaya...@gmail.com wrote: Hello I have installed

[GENERAL] effective_io_concurrency on Windows

2013-03-26 Thread Bartosz Dmytrak
Hi all is it possible to introduce similar solution for Windows systems in future? I am aware it is not available because of lack of posix_fadvise function, but I believe there is a way to introduce this feature for Win systems. Regards, Bartek

[GENERAL] Do after update trigger block the current transaction?

2013-03-26 Thread Clemens Eisserer
Hi, We are currently evaluating the feasibility of executing long-running scripts written in shell-script (plsh) called by triggers (after update/insert) to synchronize two databases. Will triggers (after update specifically) cause the execution of SQL-commands to pause until the trigger-function

Re: [GENERAL] Acess Oracle with dbi-link (PostgreSQL) Error Compile

2013-03-26 Thread Albe Laurenz
Emanuel Araújo wrote: I'm having trouble making a base to access Oracle via dbi-link, because when installing DBD::Oracle version 1.58 the same mistakes some missing files. Ago as oci.h, it is being called within the oracle.h The purpose would be to sync data between two tools for

Re: [GENERAL] PostgreSQL service terminated by query

2013-03-26 Thread Richard Huxton
On 26/03/13 05:55, adrian.kitching...@dse.vic.gov.au wrote: I'm hoping I can get some info on a query which terminates my PostgreSQL service. The query is a relatively simple PostGIS query: The log text when the service crashes is: 2013-03-26 15:49:55 EST LOG: server process (PID 3536) was

Re: [GENERAL] Bad plan on a huge table query

2013-03-26 Thread Daniel Cristian Cruz
Well, I did it: explain (analyze, buffers) select count(*) from turma.aula_confirmacao where inicio_aula::DATE BETWEEN DATE_TRUNC('YEAR', CURRENT_TIMESTAMP) AND CURRENT_TIMESTAMP; -- changed name because of a conflict in some queries http://explain.depesz.com/s/Fzr And just to update, this is

Re: [GENERAL] Do after update trigger block the current transaction?

2013-03-26 Thread Clemens Eisserer
Hi Richard, Will triggers (after update specifically) cause the execution of SQL-commands to pause until the trigger-function has returned (at statement execution time or commit)? The trigger will block. If it didn't then it couldn't abort the transaction if it needed to. Thanks for the

Re: [GENERAL] effective_io_concurrency on Windows

2013-03-26 Thread Merlin Moncure
On Tue, Mar 26, 2013 at 3:35 AM, Bartosz Dmytrak bdmyt...@gmail.com wrote: Hi all is it possible to introduce similar solution for Windows systems in future? I am aware it is not available because of lack of posix_fadvise function, but I believe there is a way to introduce this feature for Win

Re: [GENERAL] Do after update trigger block the current transaction?

2013-03-26 Thread Richard Huxton
On 26/03/13 13:24, Clemens Eisserer wrote: Hi Richard, Will triggers (after update specifically) cause the execution of SQL-commands to pause until the trigger-function has returned (at statement execution time or commit)? The trigger will block. If it didn't then it couldn't abort the

Re: [GENERAL] Do after update trigger block the current transaction?

2013-03-26 Thread Clemens Eisserer
Hi Richard, Might be worth looking at PgQ - a queueing system underlying Londiste. That would handle tracking the changes in PostgreSQL leaving you to just handle the MySQL end. Timestamps will do the job as long as you are careful to allow enough slack to deal with clock updates. Thanks a

[GENERAL] Why does Postgres allow duplicate (FK) constraints

2013-03-26 Thread Thomas Kellerer
Hi, I was a bit surprised that the following DDL will work: create table parent (id integer not null primary key); create table child (id integer not null primary key, pid integer not null); alter table child add constraint fk_child_parent foreign key (pid) references parent(id);

Re: [GENERAL] Why does Postgres allow duplicate (FK) constraints

2013-03-26 Thread Tom Lane
Thomas Kellerer spam_ea...@gmx.net writes: While I agree that this SQL should not have been written like this in the first place, I wonder why Postgres doesn't actively prevent this (like e.g. Oracle). If Oracle does that, they're violating the SQL standard --- there is nothing in the

Re: [GENERAL] Why does Postgres allow duplicate (FK) constraints

2013-03-26 Thread Thomas Kellerer
Tom Lane, 26.03.2013 17:03: While I agree that this SQL should not have been written like this in the first place, I wonder why Postgres doesn't actively prevent this (like e.g. Oracle). If Oracle does that, they're violating the SQL standard --- there is nothing in the standard that supports

Re: [GENERAL] Why does Postgres allow duplicate (FK) constraints

2013-03-26 Thread Tom Lane
Thomas Kellerer spam_ea...@gmx.net writes: Tom Lane, 26.03.2013 17:03: If Oracle does that, they're violating the SQL standard --- there is nothing in the standard that supports rejecting an ALTER TABLE ADD CONSTRAINT on the grounds that it's redundant. The spec only says you can't give two

Re: [GENERAL] Why does Postgres allow duplicate (FK) constraints

2013-03-26 Thread Alban Hertroys
On 26 March 2013 17:07, Thomas Kellerer spam_ea...@gmx.net wrote: Is there anything in the standard that actively requires that you can create two identical constraints? Because technically it simply doesn't make sense, does it? It can make sense during a maintenance window, if you create

[GENERAL] Unexpected behaviour of encode()

2013-03-26 Thread Bill Moran
psql -U postgres psql (9.2.3) Type help for help. postgres=# select encode('can''t', 'escape'); encode can't (1 row) I observed the same behaviour on one of our older systems (8.3.11) as well. Am I missing something? I expected can''t as the output. -- Bill Moran

Re: [GENERAL] Unexpected behaviour of encode()

2013-03-26 Thread Merlin Moncure
On Tue, Mar 26, 2013 at 12:47 PM, Bill Moran wmo...@potentialtech.com wrote: psql -U postgres psql (9.2.3) Type help for help. postgres=# select encode('can''t', 'escape'); encode can't (1 row) I observed the same behaviour on one of our older systems (8.3.11) as well. Am

Re: [GENERAL] pg_stat_get_last_vacuum_time(): why non-FULL?

2013-03-26 Thread Kevin Grittner
CR Lender crlen...@gmail.com wrote: According to the manual (9.1), pg_stat_get_last_vacuum_time() returns timestamptz | Time of the last non-FULL vacuum initiated by the | user on this table Why are full vacuums excluded from this statistic? It looks like there's no way

Re: [GENERAL] Unexpected behaviour of encode()

2013-03-26 Thread Merlin Moncure
On Tue, Mar 26, 2013 at 1:36 PM, Bill Moran wmo...@potentialtech.com wrote: I get can't which is what I'd expect. I would then expect encode to escape the ' somehow. nope -- encode/escape doesn't escape single quotes. it's not designed to produce output that can be fed directly back into the

Re: [GENERAL] Unexpected behaviour of encode()

2013-03-26 Thread Tom Lane
Bill Moran wmo...@potentialtech.com writes: If I just do: SELECT 'can''t'::text; I get can't which is what I'd expect. I would then expect encode to escape the ' somehow. Even c-style escaping, like can\'t would have been less surprising to me. If there's something I'm missing, I'm still

[GENERAL] Building an invalidation queue in Postgres

2013-03-26 Thread Laurence Rowe
I'd like to cache parts of my database locally on each client. To keep those caches in sync I'd like to implement an invalidation queue. A naïve approach would be to simply create a table of (txn_id, invalidated_object_ids), then have the clients query this table for txn_ids last_queried_txn_id.

Re: [GENERAL] Age of the WAL?

2013-03-26 Thread Erik Jones
On Mar 12, 2013, at 4:13 PM, Tom Lane wrote: Erik Jones ejo...@engineyard.com writes: What's the best way to determine the age of the current WAL? Not the current segment, but the whole thing. Put another way: is there a way to determine a timestamp for the oldest available transaction

Re: [GENERAL] Age of the WAL?

2013-03-26 Thread Tom Lane
Erik Jones ejo...@engineyard.com writes: On Mar 12, 2013, at 4:13 PM, Tom Lane wrote: Transaction commit and abort records carry timestamps, so you could figure this out with something like pg_xlogdump. I don't know of any canned solution though. Anyway, will pg_xlogdump work with any

Re: [GENERAL] Age of the WAL?

2013-03-26 Thread Peter Geoghegan
On 26 March 2013 22:21, Tom Lane t...@sss.pgh.pa.us wrote: The version recently added to contrib is only meant to work with the current server release, AFAIK. However, it's derived from older standalone programs that are out there somewhere --- did you look around on pgfoundry? Actually, I

Re: [GENERAL] PostgreSQL service terminated by query

2013-03-26 Thread adrian . kitchingman
Thanks for the suggestion Richard. I dumped the two tables in question and restored them which got the query working for a while until it eventually crashed the service again at another gid. I'll do a RAM check tonight. I transferred the whole database to another computer and so far the query

[GENERAL] pltcl and modules question

2013-03-26 Thread hamann . w
Hi, is there any way to use a module within a pltcl script, i.e. have load /path/to/mystuff.so or package require mystuff in a script. The reason why I am asking: I have recently converted a fairly slow script (lots of regex) into one compiled module that basically does all regex at once, and