Re: [HACKERS] [GENERAL] Date conversion using day of week

2011-03-30 Thread Brendan Jurd
On 31 March 2011 03:15, Steve Crawford wrote: > On 03/29/2011 04:24 PM, Adrian Klaver wrote: >> ... >> Well the strange part is only fails for SUN:... >> test(5432)aklaver=>select to_date('2011-13-SUN', 'IYYY-IW-DY'); >>   to_date >> >>  2011-03-28 >> ... > > You specified Sunday as t

Re: [GENERAL] pg_restore

2011-03-30 Thread Joshua D. Drake
> > however, you might look at PITR and/or WAL log shipping rather than > > dump/restore. this would only update new data, and when you playback the > > WAL log on the backup server bring it up to whatever point in time you want. > > I looked at PITR and WAL, but it looks like I can't have the b

Re: [GENERAL] pg_restore

2011-03-30 Thread John R Pierce
On 03/30/11 4:08 PM, Mike Orr wrote: I looked at PITR and WAL, but it looks like I can't have the backup database running and answering queries while it's WAL'ing. I'd have to log in and switch it to normal mode and start the webapp, and that's what I may not be able to do if the backup server we

Re: [GENERAL] pg_restore

2011-03-30 Thread Mike Orr
On Wed, Mar 30, 2011 at 2:36 PM, John R Pierce wrote: > On 03/30/11 1:56 PM, Mike Orr wrote: >> >> MySQL simply locks the tables, drops/recreates them, loads the data, >> and unlocks the tables. Other connections have to wait but they don't >> have to be closed/reopened. The PostgreSQL manual reco

Re: [GENERAL] pg_restore

2011-03-30 Thread Scott Marlowe
On Wed, Mar 30, 2011 at 2:56 PM, Mike Orr wrote: > I'm converting a MySQL webapp to PostgreSQL. I have a backup server > which is refreshed twice daily with mysqldump/mysql and has a > continuously-running copy of the webapp. I want to replicate this with > pg_dump/pg_restore.  Ideally I'd like to

Re: [GENERAL] pg_restore

2011-03-30 Thread John R Pierce
On 03/30/11 1:56 PM, Mike Orr wrote: MySQL simply locks the tables, drops/recreates them, loads the data, and unlocks the tables. Other connections have to wait but they don't have to be closed/reopened. The PostgreSQL manual recommends restoring into an empty database using template0, which woul

[GENERAL] pg_restore

2011-03-30 Thread Mike Orr
I'm converting a MySQL webapp to PostgreSQL. I have a backup server which is refreshed twice daily with mysqldump/mysql and has a continuously-running copy of the webapp. I want to replicate this with pg_dump/pg_restore. Ideally I'd like to restore just a few tables, without stopping the webapp an

[GENERAL] Passing infinity as a timestamp value in Ruby

2011-03-30 Thread James B. Byrne
I have run into a situation in Ruby on Rails-3.0.5 wherein the framework attempts to set unreferenced columns to their default values as extracted from the DBMS. However, it cannot handle infinity as a datetime class, which evidently is what AR maps timestamps to, and so attempts to insert NULL in

Re: [GENERAL] revoke permissions - not working as expected

2011-03-30 Thread David Johnston
The most important thing to remember about REVOKE is that it can only revoke a permission that was explicitly granted. Every database has GLOBAL permissions not tied to any specific schema and granted to PUBLIC. These permissions are inherited by all ROLES as long as they (the permissions) are in

[GENERAL] revoke permissions - not working as expected

2011-03-30 Thread Susan Cassidy
OK, I must be doing something wrong. I'm trying to create a user with only limited access to certain tables. The db is large, complicated, and has tons of users with some complex interactions of permission using groups, etc. I don't dare revoke any exist permissions, for fear of messing up a

Re: [GENERAL] -s does not work

2011-03-30 Thread Guillaume Lelarge
Le 30/03/2011 18:02, Paul Gaspar a écrit : > [...] > I want to get rid of all those messages like "database system is ready to > accept connections" in the log file. -s is the appropiate command in pg_ctl, > I thought, but I still get those messages. > > This is the command line to start pg: >

Re: [GENERAL] -s does not work

2011-03-30 Thread Adrian Klaver
On 03/30/2011 09:02 AM, Paul Gaspar wrote: Hi all, I want to get rid of all those messages like "database system is ready to accept connections" in the log file. -s is the appropiate command in pg_ctl, I thought, but I still get those messages. This is the command line to start pg: /.../pg_c

Re: [GENERAL] Date conversion using day of week

2011-03-30 Thread Adrian Klaver
On 03/30/2011 09:15 AM, Steve Crawford wrote: On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=>select to_date('2011-13-SUN', 'IYYY-IW-DY'); to_date 2011-03-28 ... You specified Sunday as the day but the date return

Re: [GENERAL] OSX Postgres PL/Perl Problem with Finance::Quote/Options

2011-03-30 Thread Peter Pan
> From: bada...@gmail.com > Date: Wed, 30 Mar 2011 09:33:50 -0600 > Subject: Re: [GENERAL] OSX Postgres PL/Perl Problem with > Finance::Quote/Options > To: ganbar...@hotmail.com > CC: pgsql-general@postgresql.org > > 2011/3/30 Peter Pan : > ... > > Unfortunately none at all, it just fails du

Re: [GENERAL] Date conversion using day of week

2011-03-30 Thread Steve Crawford
On 03/29/2011 04:24 PM, Adrian Klaver wrote: ... Well the strange part is only fails for SUN:... test(5432)aklaver=>select to_date('2011-13-SUN', 'IYYY-IW-DY'); to_date 2011-03-28 ... You specified Sunday as the day but the date returned is a Monday. I would categorize that as

[GENERAL] -s does not work

2011-03-30 Thread Paul Gaspar
Hi all, I want to get rid of all those messages like "database system is ready to accept connections" in the log file. -s is the appropiate command in pg_ctl, I thought, but I still get those messages. This is the command line to start pg: /.../pg_ctl start -s -U ... -l /.../Log.txt -o "-p 123

Re: [GENERAL] OSX Postgres PL/Perl Problem with Finance::Quote/Options

2011-03-30 Thread Alex Hunsaker
2011/3/30 Peter Pan : ... > Unfortunately none at all, it just fails during the fetch and can't find any > error messages anywhere. As stated, the same module works without problems > in a local separate perl script. > > Any ideas? Skimming the source of Finance::Quote::Yahoo::USA (which seems to

[GENERAL] DBD::Pg 2.18.0 released

2011-03-30 Thread Greg Sabino Mullane
Version 2.18.0 of DBD::Pg, the Perl interface to Postgres, has just been released. This fixes some important memory leaks, adds a true cancel() method (per DBI spec), and fixes some other minor bugs. The new version is available from CPAN, of course. Checksums: 4a14e9a160544dea9d6d9e5d9d241703

Re: [GENERAL] pg_dump problems

2011-03-30 Thread Martín Marqués
Just to to finish this thread: We had a corrupted memory bank in the development server, and that was, for some reason corrupting the data that got written to disk. All is good now. Sorry for the noise. El día 23 de marzo de 2011 16:28, Martín Marqués escribió: > 2011/3/23 Vick Khera : >> 2011/

Re: [GENERAL] Stange IO error while working with large objects.

2011-03-30 Thread Dmitriy Igrishin
Hey Merlin, 2011/3/30 Merlin Moncure > On Wed, Mar 30, 2011 at 7:37 AM, Dmitriy Igrishin > wrote: > > I've checked the disk with badblocs(8). The results are: > > > > File /pgsql/9.0/data0/base/16386/11838.5 (inode #3015588, mod time Wed > Mar > > 30 13:13:13 2011) > > has 50 multiply-claimed

Re: [GENERAL] OSX Postgres PL/Perl Problem with Finance::Quote/Options

2011-03-30 Thread Peter Pan
> Subject: Re: [GENERAL] OSX Postgres PL/Perl Problem with > Finance::Quote/Options > From: vibhor.ku...@enterprisedb.com > Date: Wed, 30 Mar 2011 03:01:29 +0530 > CC: pgsql-general@postgresql.org > To: ganbar...@hotmail.com > > > On Mar 29, 2011, at 9:11 PM, Peter Pan wrote: > > > I use two

Re: [GENERAL] Stange IO error while working with large objects.

2011-03-30 Thread Merlin Moncure
On Wed, Mar 30, 2011 at 7:37 AM, Dmitriy Igrishin wrote: > I've checked the disk with badblocs(8). The results are: > > File /pgsql/9.0/data0/base/16386/11838.5 (inode #3015588, mod time Wed Mar > 30 13:13:13 2011) >   has 50 multiply-claimed block(s), shared with 1 file(s): >     (inode #1, mod

Re: [GENERAL] Stange IO error while working with large objects.

2011-03-30 Thread Dmitriy Igrishin
I've checked the disk with badblocs(8). The results are: File /pgsql/9.0/data0/base/16386/11838.5 (inode #3015588, mod time Wed Mar 30 13:13:13 2011) has 50 multiply-claimed block(s), shared with 1 file(s): (inode #1, mod time Wed Mar 30 15:23:19 2011) After this, I've dropped the database

Re: [GENERAL] Is pglesslog stable for use in 9.0?

2011-03-30 Thread Koichi Suzuki
Thank you very much for your interest in pglesslog.Last year, I had an issue report that recovery failed during replaying pglesslog'ed WAL segment.My investigation showed no fault in pglesslog, but I'm now looking for a workaround on this issue. I have already made pglesslog for 9.0 local

[GENERAL] Stange IO error while working with large objects.

2011-03-30 Thread Dmitriy Igrishin
Hey all, I've never experienced such problems before pefrorming some tests on large objects. I am on Ubuntu and my HDD is whole encrypted (LVM2). I've imported large object ~ 1.5 Gb of size. After this, entire system lost performance dramaticaly and the disk activity becomes anomalous. After rebo