S Arvind wrote:
Is there any possibility to mention max time a query can execute from
DBCP side? our DB is Postgres and Container is tomcat 6. we dont want to
give the timeout in postgres for all query but need to set in
application side based on differnet needs? Is it possible?
Is there anyo
In response to S Arvind :
> Is there any possibility to mention max time a query can execute from DBCP
> side? our DB is Postgres and Container is tomcat 6. we dont want to give the
> timeout in postgres for all query but need to set in application side based on
> differnet needs? Is it possible?
>
Is there any possibility to mention max time a query can execute from DBCP
side? our DB is Postgres and Container is tomcat 6. we dont want to give the
timeout in postgres for all query but need to set in application side based
on differnet needs? Is it possible?
Is there anyother way to specify t
Massa, Harald Armin wrote:
> Bruce,
>
> I am thinking your best solution is to create a table with a uuid column
> > and reference that to sync up your data. That would also allow data
> > dumps to be restored to another machine with the proper identifier
> > because the identifier is really a ch
On 4 jun 2009, at 22.17, Richard Broersma wrote:
On Thu, Jun 4, 2009 at 1:13 PM, Brandon Metcalf
wrote:
Is there a way when creating a table to limit it to one row? That
is,
without using a stored procedure?
Sure just add a check constraint along the lines of:
CONSTRAINT Only_one_row
On 4 Jun 2009, at 13:11, Sam Mason wrote:
You need to take care of only one case here: denominator == 0; rest
of the
cases will be handled sanely by the database.
CASE WHEN packet_size = 0 THEN null ELSE cost/packet_size END as
unit_cost
Yes; or even shorter:
cost/nullif(packet_size,
On Thu, Jun 4, 2009 at 4:40 PM, Radcon Entec wrote:
> Merlin,
>
> Thank you for your reply. Unfortunately, I was not able to get it to work.
> The SQL statements you gave me generated syntax errors.
>
> I tried to follow your thoughts, though. I created the following type:
>
> CREATE TYPE charge
r == richard.broer...@gmail.com writes:
r> On Thu, Jun 4, 2009 at 1:23 PM, Brandon Metcalf
r> wrote:
r> > Got it. ?Currently, it doesn't have a column for an ID, but I can add
r> > one if this is the only way.
r> Actually any column with a unique index on it will work. It doesn't
r> hav
On Thu, Jun 4, 2009 at 1:23 PM, Brandon Metcalf
wrote:
> Got it. Currently, it doesn't have a column for an ID, but I can add
> one if this is the only way.
Actually any column with a unique index on it will work. It doesn't
have to be primary key or even a serial id.
ANSI-SQL 92 allows for
r == richard.broer...@gmail.com writes:
r> On Thu, Jun 4, 2009 at 1:13 PM, Brandon Metcalf
r> wrote:
r> > Is there a way when creating a table to limit it to one row? ?That is,
r> > without using a stored procedure?
r> Sure just add a check constraint along the lines of:
r> CONSTRAINT On
On Thu, Jun 4, 2009 at 1:13 PM, Brandon Metcalf
wrote:
> Is there a way when creating a table to limit it to one row? That is,
> without using a stored procedure?
Sure just add a check constraint along the lines of:
CONSTRAINT Only_one_row
CHECK( tableuniqueid = 1 ); --assuming you row has
On Thu, Jun 4, 2009 at 1:13 PM, Brandon Metcalf
wrote:
> Is there a way when creating a table to limit it to one row? That is,
> without using a stored procedure?
Sure just add a check constraint along the lines of:
CONSTRAINT Only_one_row
CHECK( tableuniqueid = 1 ); --assuming you row has
Is there a way when creating a table to limit it to one row? That is,
without using a stored procedure?
I searched the documentation, but didn't find anything.
--
Brandon
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.pos
On Thu, Jun 4, 2009 at 11:15 AM, Radcon Entec wrote:
> Greetings!
>
> Having received the answer I needed to my question about using functions
> with OUT parameters from this list (thanks very much!), I find myself
> confused about how to use the function in a view. The function chargeneeds
> tak
On Thu, 2009-06-04 at 14:42 +0200, hubert depesz lubaczewski wrote:
> if zero-ing the files was safe, i could compress them more effectively.
Simple rule: Never, ever, ever remove or edit any file in pg_xlog.
There is a command called pg_resetxlog, though that is not designed to
reduce the amou
Ok mea maxima culpa I forgot to add an important fact:
the table I'm putting to get_distinct_values(..) in the recursive call is a
table that has just been created in the caller function (by EXECUTE 'CREATE
TABLE ' || table_name_new || '...). In the first run, the
get_distinct_values(..) obtains a
We will probably pg_dump the data for backups and look at using Slony for
replication. We thank you and Gregor for the time that you spent sharing
your insights with us.
"Bill Moran" wrote in message
news:20090604104302.50e23318.wmo...@potentialtech.com...
> In response to "Carlos Oliva" :
>
Hi,
I'd like to get an array containing distinct values (always integers) form a
column in a table that is provided as a parameter. So I created this
function:
CREATE OR REPLACE FUNCTION get_distinct_values(table_name text, param_name
text)
RETURNS integer[] AS
$BODY$
DECLARE
_values integer[];
Reporting back.. no.. I tested the track_count and autovacuum and the writes
where back.
/ Jennifer
On Thu, Jun 4, 2009 at 6:54 PM, Jennifer Trey wrote:
>
>
> On Thu, Jun 4, 2009 at 4:58 PM, Bill Moran wrote:
>
>> In response to Jennifer Trey :
>> > Bill, you wrote earlier :
>> >
>> > "
>> > Addi
On Thu, Jun 04, 2009 at 11:17:39AM -0400, Tom Lane wrote:
> Sam Mason writes:
> > I think that with 8.3 at least I'm going to carry on putting
> > IMMUTABLE on where I think it should be. Consider:
>
> there are corner cases where it's useful to have the function
> marked correctly rather than sl
On Thu, Jun 4, 2009 at 4:58 PM, Bill Moran wrote:
> In response to Jennifer Trey :
> > Bill, you wrote earlier :
> >
> > "
> > Additionally, this convinces me further that you're chasing the wrong
> > problem. The stats collector writes tiny bits of information to disk
> > every time you execute
Probably you do not have any script to start PostgreSQL, but it is started
as a service.
The data directory is a parameter of the service within services.msc, there
is
... pg_ctl.exe ... -D "":\your\directory"
Read up on pg_ctl --help how to change this information
(pg_ctl --register)
Best wish
Sam Mason writes:
> Hum, I think that with 8.3 at least I'm going to carry on putting
> IMMUTABLE on where I think it should be. Consider:
> CREATE FUNCTION fn_i(INTEGER) RETURNS BOOLEAN LANGUAGE SQL IMMUTABLE AS $$
> SELECT $1 < 1000 $$;
> CREATE FUNCTION fn_v(INTEGER) RETURNS BOOLEAN L
Greetings!
Having received the answer I needed to my question about using functions with
OUT parameters from this list (thanks very much!), I find myself confused about
how to use the function in a view. The function chargeneeds takes one input
parameter, a charge number, and has 3 output para
Bruce,
I am thinking your best solution is to create a table with a uuid column
> and reference that to sync up your data. That would also allow data
> dumps to be restored to another machine with the proper identifier
> because the identifier is really a characteristic of the data, not of
> the
Ook.. thats what I wanted to know. I figured there has to be a place to
change the pointer to the new location of the data.
Thank you / Jennifer
On Thu, Jun 4, 2009 at 6:11 PM, Bruce Momjian wrote:
> Jennifer Trey wrote:
> > Hi,
> > What file should I be working with?
>
> Just shut down the serv
Jennifer Trey wrote:
> Hi,
> What file should I be working with?
Just shut down the server and move the directory whever you want and
restart the server. There are no file contents that need changing. Of
course should adjust your scripts or PGDATA environment variable.
--
Bruce Momjian
=?UTF-8?Q?Grzegorz_Ja=C5=9Bkiewicz?= writes:
> On Thu, Jun 4, 2009 at 3:44 PM, Esneiker wrote:
>> How can I insert data in a database from other database?
>> Like this: insert into name_table select from database.table?
> you can't with postgresql directly.
> You can use dbconnect module from co
Massa, Harald Armin wrote:
> Bruce,
>
> > would be "database system identification" - the rather unique ID of a
>
> > > database installation. Third line in pg_controldata output:
> > >
> > --
> > > Datenb
In response to Jennifer Trey :
> Bill, you wrote earlier :
>
> "
> Additionally, this convinces me further that you're chasing the wrong
> problem. The stats collector writes tiny bits of information to disk
> every time you execute a command. If your system is slow because of this
> tiny bit of
On Thu, Jun 04, 2009 at 10:34:31AM -0400, Tom Lane wrote:
> create function foo(int) returns int as
> $$ select coalesce($1, 42); $$ language sql strict;
>
> Because this function is declared STRICT, it must return null on null
> input. However, the contained expression would not act that way ---
Hi,
What file should I be working with?
Thanks in advance / Jennifer
On Thu, Jun 4, 2009 at 3:44 PM, Esneiker wrote:
> Hello.
>
> How can I insert data in a database from other database?
>
> Like this: insert into name_table select from database.table?
>
>
you can't with postgresql directly.
You can use dbconnect module from contrib to do stuff like that.
--
GJ
Hello.
How can I insert data in a database from other database?
Like this: insert into name_table select from database.table?
Thanks.
Ing. Esneiker Enriquez Cabrera.
Excelencia en Software.
Desoft S.A. en Ciego de Ávila.
Joaquín de Agüero Esq. Calle 2. Ciego de Ávila. Cuba.
email:
In response to "Carlos Oliva" :
> Thank you for the link to the document. It provides a wealth of
> information that re-inforces your stements. It is still somewhat unclear to
> me what it is that would change in the database for tables that are never
> updated (not inserts, updates, or delt
On Thu, Jun 4, 2009 at 5:32 AM, Carlos Oliva wrote:
> Thank you for your response Grzegorx. It is helping us a great deal to
> understand the issues around backups. Would any of the pg_xlog, pg_clog,
> etc change for a table that has a stable structure and data? That is, the
> table undergoes s
Sam Mason writes:
> On Thu, Jun 04, 2009 at 09:48:17AM -0400, Tom Lane wrote:
>> Actually, if you're intending that a SQL function be inline-able then
>> it's best *not* to mark it as IMMUTABLE (nor STRICT either). If the
>> marking matches the behavior of the contained expression then it
>> does
ßO8~˪y×]ùë6Ó^4ëOtÓHola, me coneecto remoto a un server postgres, con el pgadmin, creo una base de datos y
le doy click derecho y no me da las opciones de restaurar ni de hacer respaldo a la base
de datos y cuando voy a herramientas aparecen deshabilitadas esas opciones, que puede
serme cone
Hola, me coneecto remoto a un server postgres, con el pgadmin, creo una base de
datos y
le doy click derecho y no me da las opciones de restaurar ni de hacer respaldo
a la base
de datos y cuando voy a herramientas aparecen deshabilitadas esas opciones, que
puede
serme conecto con el usuari
Greg Smith wrote:
On Thu, 4 Jun 2009, Geoffrey wrote:
For now, I'm still looking at the other tools as well as attempting to
verify that my current solution doesn't miss any 'little issues.'
The main thing you want to test out are that it acts sanely when the
network connection to the destin
Thank you for the link to the document. It provides a wealth of
information that re-inforces your stements. It is still somewhat unclear to
me what it is that would change in the database for tables that are never
updated (not inserts, updates, or deltes) after a certain point in time.
That
No, I don't have any virus programs installed.
Bill, you wrote earlier :
"
Additionally, this convinces me further that you're chasing the wrong
problem. The stats collector writes tiny bits of information to disk
every time you execute a command. If your system is slow because of this
tiny bit
On Thu, Jun 04, 2009 at 09:48:17AM -0400, Tom Lane wrote:
> Sam Mason writes:
> > If it's an SQL function and marked as IMMUTABLE it should (I believe
> > anyway) get inlined somewhere along the line and take no more overhead
> > than writing it out in full.
>
> Actually, if you're intending that
In response to "Carlos Oliva" :
> I think that I understand. Would we need to stop the databse and then do
> the copy? Is this the state to which you are refering? If the tables never
> changed after a week or so, what else would change in the database for these
> tables after a month, two m
On Thu, 4 Jun 2009, hubert depesz lubaczewski wrote:
is it safe, if i would do:
dd if=/dev/zero of=$ORIGINAL_XLOG_SEGMENT bs=1M count=16
before returning from archive_command script?
Nope. At that point, the files are still needed for crash recovery on
that system. There will be a future po
On Thu, 4 Jun 2009, Geoffrey wrote:
For now, I'm still looking at the other tools as well as attempting to verify
that my current solution doesn't miss any 'little issues.'
The main thing you want to test out are that it acts sanely when the
network connection to the destination server is out
Sam Mason writes:
> If it's an SQL function and marked as IMMUTABLE it should (I believe
> anyway) get inlined somewhere along the line and take no more overhead
> than writing it out in full.
Actually, if you're intending that a SQL function be inline-able then
it's best *not* to mark it as IMMU
I think that I understand. Would we need to stop the databse and then do
the copy? Is this the state to which you are refering? If the tables never
changed after a week or so, what else would change in the database for these
tables after a month, two months, or a year? Would we need to put t
On Thu, Jun 4, 2009 at 1:23 PM, Carlos Oliva wrote:
> In which state do we need to put the db? We can use both types of backup
> strategy. We can pg_dump the table and copy the tablespace folder along
> with anyhting else that we may need.
Well, not quite. Pg_dump is fine, but you can't just cop
hi,
i have archive_command which copies the wal segment someplace.
is it safe, if i would do:
dd if=/dev/zero of=$ORIGINAL_XLOG_SEGMENT bs=1M count=16
before returning from archive_command script?
the point of doing so is pretty simple: i have a system with rather low
traffic, so i use archive_ti
In which state do we need to put the db? We can use both types of backup
strategy. We can pg_dump the table and copy the tablespace folder along
with anyhting else that we may need.
""Grzegorz Jaskiewicz"" wrote in message
news:2f4958ff0906040518l190af73dpff180755d567f...@mail.gmail.com...
On
> Filtering out with the pid showed that it was the file
> pgdata/global/pgstat.tmp
>> Filtering out with the pid showed that it was the file
>> pgdata/global/pgstat.tmp
>
> That's the statistics collector -- which makes sense, depending
> on your settings, it has to write stats for every operation
On Thursday 4. June 2009, Radcon Entec wrote:
>I have been beating my head against the documentation on plpgsql
> functions with output parameters for the last three hours, but I
> haven't been able to get them to work yet.
>
>
>I am playing with the sum_n_product function, taken from the
> doucmen
Joshua D. Drake wrote:
On Wed, 2009-06-03 at 15:07 -0400, Geoffrey wrote:
You are still going to need to either:
A. Reinvent the wheel, by scripting it all yourself
B. Use solutions that are already used by others such as walmgr or
pitrtools
My assumption was that since pg_standby does not hav
On Thu, Jun 4, 2009 at 1:07 PM, Carlos Oliva wrote:
> Thanks again Grzgorz for your expedicious reply. Would anything else change
> in the database for a table once it ceases to be updated? We have several
> tables for which a number of records is inserted and never again updated --
> data is ne
Thanks again Grzgorz for your expedicious reply. Would anything else change
in the database for a table once it ceases to be updated? We have several
tables for which a number of records is inserted and never again updated --
data is never updated, deleted, or inserted again. We are moving t
I have been beating my head against the documentation on plpgsql functions with
output parameters for the last three hours, but I haven't been able to get them
to work yet.
I am playing with the sum_n_product function, taken from the doucmentation:
-- Function: sum_n_product(integer, integer)
pg_xlog and clog is something that is used during operation, and for
point in time recovery.
It doesn't go to database dump at all, not needed.
On Thu, Jun 4, 2009 at 12:32 PM, Carlos Oliva wrote:
> Thank you for your response Grzegorx. It is helping us a great deal to
> understand the issues a
Thank you for your response Bill. It is helping us a great deal to
understand the issues around backups. Would any of the pg_xlog, pg_clog,
etc change for a table that has a stable structure and data? That is, the
table undergoes several inserts and then it is never updated
"Bill Moran" wrote i
Thank you for your response Grzegorx. It is helping us a great deal to
understand the issues around backups. Would any of the pg_xlog, pg_clog,
etc change for a table that has a stable structure and data? That is, the
table undergoes several inserts and then it is never updated
""Grzegorz Jaskie
At 04:44 AM 6/4/2009, Jennifer Trey wrote:
No, I created a new DB, created a table, and did not even populate any data.
Running select count(*) from test
just now, still caused the 10-20 I/O-writes.
Not sure if this is the main problem, but by default windows will
write to the disk whenever f
On Thu, Jun 04, 2009 at 01:48:28PM +0300, Jennifer Trey wrote:
> and its possible
> that the two drives are misconfigured. I have checked into that a little and
> can't rule it out completely.
See, this is what others have talked about. You don't give
details on what you checked, what you found,
Greg Smith wrote:
On Wed, 3 Jun 2009, Geoffrey wrote:
My assumption was that since pg_standby does not have the scp/rsync
functionality, I would have to either modify it, change the way we do
things, or 'reinvent' a little different wheel.
There are three things to setup here:
1) archive_co
Sorry, went to bed yesterday :D
I have installed postgresql-8.3.7-1-windows.exe
Bill, you are right. The app does do tons of small queries, and its possible
that the two drives are misconfigured. I have checked into that a little and
can't rule it out completely.
Yes, my images hang indefinitly,
On Thu, Jun 04, 2009 at 12:12:09AM +0530, Gurjeet Singh wrote:
> On Wed, Jun 3, 2009 at 9:18 PM, Oliver Kohll wrote:
> > SELECT cost / pack_size AS unit_cost from products;
> >
> > Either variable could be null or zero.
> >
> > I don't want to write new functions, I'd rather keep it in plain SQL.
>
Hi, all
I want to achieve a simple, safe hot backup and recovery using PostgreSQL 8.3
or later.
The standalone hot backup script listed in "24.3.5.1. Standalone hot backups"
(http://www.postgresql.org/docs/8.3/interactive/continuous-archiving.html)
seems to very helpful for me because it's simple
Bruce,
> would be "database system identification" - the rather unique ID of a
> > database installation. Third line in pg_controldata output:
> >
> --
> > Datenbanksystemidentifikation:5293702
67 matches
Mail list logo