Re: [GENERAL] Inconsistent query performance

2013-04-08 Thread Jeff Janes
On Monday, April 8, 2013, Ramsey Gurley wrote: > Hi all, > > I'm having issues with slow queries using postgres, and I'm finding some > of the issues difficult to reproduce. My application logs slow queries for > me, but often, when I go back to run explain analyze on the query it is > very fast.

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread David Kerr
On Apr 8, 2013, at 5:52 PM, Tatsuo Ishii wrote: >> 2013/4/9 Tatsuo Ishii : While debugging this with a coworker we figured out that pg_ctl was attaching to the tty and then it clicked that we needed to be using '-t' where I was using -T or (neither). >>> >>> Are you sure? I chec

Re: [GENERAL] Inconsistent query performance

2013-04-08 Thread Kevin Grittner
Ramsey Gurley wrote: > I'm having issues with slow queries using postgres, and I'm > finding some of the issues difficult to reproduce. My application > logs slow queries for me, but often, when I go back to run explain > analyze on the query it is very fast. I assume this is due to some > sort o

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

2013-04-08 Thread Jeff Janes
On Monday, April 8, 2013, Kevin Grittner wrote: > Jeff Janes > wrote: > > Amit Kapila > wrote: > > >> One of the important difference is that during the time VACUUM > >> FULL is operating on a relation, no other operations will be > >> allowed on that relation. Most of admin care about this point,

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread Tatsuo Ishii
> 2013/4/9 Tatsuo Ishii : >>> While debugging this with a coworker we figured out that pg_ctl was >>> attaching to the tty and then it clicked >>> that we needed to be using '-t' where I was using -T or (neither). >> >> Are you sure? I checked the pg_ctl source code and could not find any >> place

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread Ian Lawrence Barwick
2013/4/9 Tatsuo Ishii : >> While debugging this with a coworker we figured out that pg_ctl was >> attaching to the tty and then it clicked >> that we needed to be using '-t' where I was using -T or (neither). > > Are you sure? I checked the pg_ctl source code and could not find any > place attachi

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread Tatsuo Ishii
> While debugging this with a coworker we figured out that pg_ctl was attaching > to the tty and then it clicked > that we needed to be using '-t' where I was using -T or (neither). Are you sure? I checked the pg_ctl source code and could not find any place attaching to the tty. -- Tatsuo Ishii S

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread David Kerr
On Mon, Apr 08, 2013 at 04:24:45PM -0700, David Kerr wrote: - On Mon, Apr 08, 2013 at 02:59:56PM -0700, David Kerr wrote: - - On Mon, Apr 08, 2013 at 02:09:42PM -0700, David Kerr wrote: - - - On Mon, Apr 08, 2013 at 02:14:14PM -0600, Quentin Hartman wrote: - - - - What version of pgpool are you usi

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread David Kerr
On Mon, Apr 08, 2013 at 02:59:56PM -0700, David Kerr wrote: - On Mon, Apr 08, 2013 at 02:09:42PM -0700, David Kerr wrote: - - On Mon, Apr 08, 2013 at 02:14:14PM -0600, Quentin Hartman wrote: - - - What version of pgpool are you using? - - - - - - Are there other commands you have a problem with? I

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 08:28 AM, Daniele Varrazzo wrote: On Mon, Apr 8, 2013 at 3:15 PM, Richard Harley wrote: That returns nothings also. But I have spied the problem now: select ATTENDANCE.timestamp::text from attendance order by timestamp desc limit 1 return the actual timestamp: 2013-04-08 12:42

Re: [GENERAL] Difference between Python and Postgres locale currency formats

2013-04-08 Thread Tom Lane
Christian Jauvin writes: > while using Postgres 9.1: > set lc_monetary = 'fr_CA.UTF-8'; > select 1.234::money; -- '$1,23' That was changed in 9.2 --- per the release notes: Support more locale-specific formatting options for the money data type (Tom Lane) Specifically,

Re: [GENERAL] Inconsistent query performance

2013-04-08 Thread Ramsey Gurley
I forgot to mention. I'm currently using postgres 8.3.x On Apr 8, 2013, at 3:08 PM, Ramsey Gurley wrote: > Hi all, > > I'm having issues with slow queries using postgres, and I'm finding some of > the issues difficult to reproduce. My application logs slow queries for me, > but often, when I g

Re: [GENERAL] How to find more description of Bug than what is given in release notes

2013-04-08 Thread Nicholas DiPiazza
This one in particular from 9.1.8 I'm wondering how to detect to see if any of my backups will hit this during WAL replay: "Fix multiple problems in detection of when a consistent database state has been reached during WAL replay" But there are some more. -Original Message- From: Bruc

Re: [GENERAL] How to find more description of Bug than what is given in release notes

2013-04-08 Thread Bruce Momjian
On Mon, Apr 8, 2013 at 04:45:02PM -0500, Nicholas DiPiazza wrote: > I’m looking for some more detailed description of bugs than is given in the > release notes. > > > > For example, there is information that states that my backups may be invalid > and won’t be restorable. But I have no idea wh

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

2013-04-08 Thread Kevin Grittner
Jeff Janes wrote: > Amit Kapila wrote: >> One of the important difference is that during the time VACUUM >> FULL is operating on a relation, no other operations will be >> allowed on that relation. Most of admin care about this point, >> because they don't want to stop operations for background

[GENERAL] Inconsistent query performance

2013-04-08 Thread Ramsey Gurley
Hi all, I'm having issues with slow queries using postgres, and I'm finding some of the issues difficult to reproduce. My application logs slow queries for me, but often, when I go back to run explain analyze on the query it is very fast. I assume this is due to some sort of caching. Here is an

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread David Kerr
On Mon, Apr 08, 2013 at 02:09:42PM -0700, David Kerr wrote: - On Mon, Apr 08, 2013 at 02:14:14PM -0600, Quentin Hartman wrote: - - What version of pgpool are you using? - - - - Are there other commands you have a problem with? I would suspect that the - - restart is causing the postgres server to

[GENERAL] How to find more description of Bug than what is given in release notes

2013-04-08 Thread Nicholas DiPiazza
I'm looking for some more detailed description of bugs than is given in the release notes. For example, there is information that states that my backups may be invalid and won't be restorable. But I have no idea what the cause of the issue is and how to find out I'm vulnerable or not. How

Re: [GENERAL] Backup advice

2013-04-08 Thread Jeff Janes
On Mon, Apr 8, 2013 at 6:14 AM, Johann Spies wrote: > I would appreciate some advice from the experts on this list about the > best backup strategy for my database. > > The setup: > > Size: might be about 200Gb > The server uses a Tivoli backup client with daily backup > At the moment There are p

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread David Kerr
On Mon, Apr 08, 2013 at 02:14:14PM -0600, Quentin Hartman wrote: - What version of pgpool are you using? - - Are there other commands you have a problem with? I would suspect that the - restart is causing the postgres server to go away, pgpool decides to - disconnect, and then it has to be manuall

Re: [GENERAL] AWS and postgres issues

2013-04-08 Thread Quentin Hartman
What version of pgpool are you using? Are there other commands you have a problem with? I would suspect that the restart is causing the postgres server to go away, pgpool decides to disconnect, and then it has to be manually added back to the cluster. Unless of course you've got automatic failback

[GENERAL] AWS and postgres issues

2013-04-08 Thread David Kerr
Howdy, I'm having a couple of problems that I believe are related to AWS and I'm wondering if anyone's seen them / overcome them. Brief background, I'm running PG 9.2.4 in a VPC on Amazon Linux. I'm also (attempting) to use PgPool for load balancing/failover. The overall problem is that it seem

Re: [GENERAL] Are partitions getting pruned?

2013-04-08 Thread Jeff Janes
On Mon, Apr 8, 2013 at 11:11 AM, Robert Klaus wrote: > Postgres 8.4.9 on CentOS > > > > I partitioned some tables over the weekend by month using a date field as > the partitioning column. Table inheritance was used and all indexes on > the parent were created on the partitions. constraint_excl

Re: [GENERAL] procedure to contribute this community

2013-04-08 Thread Martijn van Oosterhout
On Mon, Apr 08, 2013 at 07:45:16AM +1000, Chris Angelico wrote: > It seems that good software works really well with other good > software. Pike and PostgreSQL and Linux work beautifully together; VB > .NET and PostgreSQL and Windows, not so much. I wonder if that's > because smart developers use a

[GENERAL] Are partitions getting pruned?

2013-04-08 Thread Robert Klaus
Postgres 8.4.9 on CentOS I partitioned some tables over the weekend by month using a date field as the partitioning column. Table inheritance was used and all indexes on the parent were created on the partitions. constraint_exclustion = partition. My question is, are partitions really gett

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

2013-04-08 Thread Jeff Janes
On Sun, Apr 7, 2013 at 8:55 PM, Amit Kapila wrote: > > One of the important difference is that during the time VACUUM FULL is > operating on a relation, > no other operations will be allowed on that relation. Most of admin care > about this point, because > they don't want to stop operations for

[GENERAL] Difference between Python and Postgres locale currency formats

2013-04-08 Thread Christian Jauvin
Hi, First, I already posted that question to SO, if you prefer to answer it there: http://stackoverflow.com/questions/15882501/difference-between-python-and-postgres-locale-currency-formats Using Python 2.6, I get: import locale locale.setlocale(locale.LC_MONETARY, 'fr_CA.UTF-8') locale.currenc

Re: [GENERAL] Hosting PG on AWS in 2013

2013-04-08 Thread David Boreham
On 4/8/2013 3:15 AM, Vincent Veyron wrote: Could someone explain to me the point of using an AWS instance in the case of the OP, whose site is apparently very busy, versus renting a bare metal server in a datacenter? I am the OP, but I can't provide a complete answer, since personally (e.g. a

Re: [GENERAL] how to create materialized view in postgresql 8.3

2013-04-08 Thread Mike Christensen
This is the number one requested feature on Uservoice: http://postgresql.uservoice.com/forums/21853-general/suggestions/247548-materialized-views On Mon, Apr 8, 2013 at 9:27 AM, John R Pierce wrote: > On 4/7/2013 11:58 PM, Zahid Quadri wrote: > > > is it possible to created materialized view

Re: [GENERAL] how to create materialized view in postgresql 8.3

2013-04-08 Thread John R Pierce
On 4/7/2013 11:58 PM, Zahid Quadri wrote: is it possible to created materialized view in postgresql 8.3 if yes please provide some sample. in older versions, the best you could do was to create a table and populate it with your 'view', then drop it when you're done (or truncate and repopu

Re: [GENERAL] Hosting PG on AWS in 2013

2013-04-08 Thread Ben Chobot
On Apr 8, 2013, at 2:15 AM, Vincent Veyron wrote: > Could someone explain to me the point of using an AWS instance in the > case of the OP, whose site is apparently very busy, versus renting a > bare metal server in a datacenter? Well, at least in my experience, you don't go to AWS because the da

Re: [GENERAL] postgresql command line exploit found in the wild

2013-04-08 Thread Merlin Moncure
On Mon, Apr 8, 2013 at 10:48 AM, Daniel Verite wrote: > Merlin Moncure wrote: > >> if you have an internet facing database, patch it immediately! > > By the way: > > People running 9.1 on debian stable (squeeze) typically use this package: > http://packages.debian.org/squeeze-backports/pos

Re: [GENERAL] postgresql command line exploit found in the wild

2013-04-08 Thread Daniel Verite
Merlin Moncure wrote: > if you have an internet facing database, patch it immediately! By the way: People running 9.1 on debian stable (squeeze) typically use this package: http://packages.debian.org/squeeze-backports/postgresql-9.1 Currently, it looks like the fix is only available in

Re: [GENERAL] Backup advice

2013-04-08 Thread Shaun Thomas
On 04/08/2013 08:14 AM, Johann Spies wrote: Size: might be about 200Gb The server uses a Tivoli backup client with daily backup At the moment There are pg_dumps for each database on the server on a daily, weekly and monthly basis. All this gets backed up to the Tivoli server. Ok. So far, so g

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 Tom Lane wrote: > When dumping from 9.2 or newer, it'll be worth your trouble to refine > that strategy by using pg_dump's new "--section" switch to split the > dump file three ways: pre-data, data, post-data. And if you have a dump from 9.1 or

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Daniele Varrazzo
On Mon, Apr 8, 2013 at 3:15 PM, Richard Harley wrote: > > That returns nothings also. But I have spied the problem now: > > select ATTENDANCE.timestamp::text from attendance order by timestamp desc > limit 1 > > return the actual timestamp: 2013-04-08 12:42:40.089952 > > So the theory I'm wonderi

Re: [GENERAL] [Maintainers] REL/Centos4 release of 8.4.17?

2013-04-08 Thread Jared Beck
Thanks Devrim and Martin. I'm pushing hard for an OS upgrade. On Sun, Apr 7, 2013 at 4:22 PM, Devrim GÜNDÜZ wrote: > > Hi, > > On Sat, 2013-04-06 at 17:16 -0400, Jared Beck wrote: >> I know Centos 4 is EOL, but will there be a REL/Centos 4 release of >> postgres 8.4.17? The latest here is 8.4.1

[GENERAL] postgresql command line exploit found in the wild

2013-04-08 Thread Merlin Moncure
see: http://schemaverse.tumblr.com/post/47312545952/the-schemaverse-was-hacked if you have an internet facing database, patch it immediately! (personally, I would only do this through a service such as pgbouncer runnning under extremely limited account). do not delay! merlin -- Sent via pgsql

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
That returns nothings also. But I have spied the problem now: select ATTENDANCE.timestamp::text from attendance order by timestamp desc limit 1 return the actual timestamp: 2013-04-08 12:42:40.089952 > So the theory I'm wondering about is that the stored data in fact > contains (some values with

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Tom Lane
Adrian Klaver writes: > On 04/08/2013 06:49 AM, Richard Harley wrote: >> It's >> timestamp| timestamp without time zone | default now() > Well timestamp is not time zone aware, so I have no idea where your time > zone offsets are coming from. I'm suspicious that they're being attached by so

Re: [GENERAL] Backup advice

2013-04-08 Thread Ian Lawrence Barwick
2013/4/8 Johann Spies : > I would appreciate some advice from the experts on this list about the best > backup strategy for my database. (...) > > I have read about using pg_basebackup in an article from Shaun Thomas' > booklet on Packt Publishers (I will probably buy the booklet). Get the bookle

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Tom Lane
Adrian Klaver writes: > On 04/08/2013 06:41 AM, Pete Wall wrote: >> I think the only way would be to "manually" dump the data using custom >> psql commands instead of using pg_dump/pg_dumpall. > You could use the -a (data only) switch to pg_dump: > http://www.postgresql.org/docs/9.2/interactive/a

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:49 AM, Richard Harley wrote: It's Column|Type | Modifiers --+-+--- attendanceid | integer | not null default nextval(

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:49 AM, Pete Wall wrote: All tables and rules would be the same. I assume with the -a flag, we'd need to create the database and relations beforehand, but that shouldn't be too much trouble. The complementary switch to -a is -s which dumps only the schema. Might be worth it to

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
It's Column|Type | Modifiers --+-+--- attendanceid | integer | not null default ne

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Pete Wall
All tables and rules would be the same. I assume with the -a flag, we'd need to create the database and relations beforehand, but that shouldn't be too much trouble. Thanks again, -Pete On 4/8/13 8:46 AM, "Adrian Klaver" wrote: >On 04/08/2013 06:41 AM, Pete Wall wrote: >> It was the data chang

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:45 AM, Richard Harley wrote: I am running the query straight through PSQL so there are no other programs or adapters. The field definition is just 'timestamp'. From psql what do you get if you do?: \d attendance I did try that as well - no luck :) Rich -- Adrian Klaver

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
I am running the query straight through PSQL so there are no other programs or adapters. The field definition is just 'timestamp'. I did try that as well - no luck :) Rich On 8 Apr 2013, at 14:36, Adrian Klaver wrote: > On 04/08/2013 06:27 AM, Richard Harley wrote: >> Sure >> >> Timestamp

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:41 AM, Pete Wall wrote: It was the data changes I was concerned about: Any additions/deletions/modifications done on the database while it's using the 9.x binaries that should be brought back if we downgrade to the 8.x version. I think the only way would be to "manually" dump th

Re: [GENERAL] PostgreSQL Downgrades

2013-04-08 Thread Pete Wall
It was the data changes I was concerned about: Any additions/deletions/modifications done on the database while it's using the 9.x binaries that should be brought back if we downgrade to the 8.x version. I think the only way would be to "manually" dump the data using custom psql commands instead o

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:27 AM, Richard Harley wrote: Sure Timestamp 2013/04/08 12:42:40 GMT+1 2013/04/08 12:42:33 GMT+1 2013/04/07 20:25:11 GMT+1 2013/04/07 20:19:52 GMT+1 2013/04/07 20:19:52 GMT+1 What program are you using to get the above result? What is the field definition for the timestamp col

Re: [GENERAL] Backup advice

2013-04-08 Thread Birta Levente
On 08/04/2013 16:14, Johann Spies wrote: I would appreciate some advice from the experts on this list about the best backup strategy for my database. The setup: Size: might be about 200Gb The server uses a Tivoli backup client with daily backup At the moment There are pg_dumps for each database

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
Sure Timestamp 2013/04/08 12:42:40 GMT+1 2013/04/08 12:42:33 GMT+1 2013/04/07 20:25:11 GMT+1 2013/04/07 20:19:52 GMT+1 2013/04/07 20:19:52 GMT+1 Some are GMT, some are GMT+1 depending on when they were entered. On 8 Apr 2013, at 14:25, Adrian Klaver wrote: > On 04/08/2013 06:22 AM, Richard

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:22 AM, Richard Harley wrote: This doesn't seem to work - take a normal GMT date for example: 2012/12/14 12:02:45 GMT select timestamp from attendance where timestamp = '2012/12/14 12:02:45' ..returns nothing Can you show the results of an unconstrained SELECT?: select timest

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
This doesn't seem to work - take a normal GMT date for example: 2012/12/14 12:02:45 GMT select timestamp from attendance where timestamp = '2012/12/14 12:02:45' ..returns nothing On 8 Apr 2013, at 14:17, Adrian Klaver wrote: > On 04/08/2013 06:03 AM, Richard Harley wrote: >> Hello all >> >

Re: [GENERAL] Selecting timestamp from Database

2013-04-08 Thread Adrian Klaver
On 04/08/2013 06:03 AM, Richard Harley wrote: Hello all Pretty sure this should be simple - how can I select a timestamp from a database? The timestamp is stored in the db like this: 2013/04/08 13:54:41 GMT+1 How can I select based on that timestamp? At the simplest level "select timestamp

[GENERAL] Backup advice

2013-04-08 Thread Johann Spies
I would appreciate some advice from the experts on this list about the best backup strategy for my database. The setup: Size: might be about 200Gb The server uses a Tivoli backup client with daily backup At the moment There are pg_dumps for each database on the server on a daily, weekly and month

[GENERAL] Selecting timestamp from Database

2013-04-08 Thread Richard Harley
Hello all Pretty sure this should be simple - how can I select a timestamp from a database? The timestamp is stored in the db like this: 2013/04/08 13:54:41 GMT+1 How can I select based on that timestamp? At the simplest level "select timestamp from attendance where timestamp = '2013/04/08 1

Re: [GENERAL] Building 3rd-party contrib/extension on Windows?

2013-04-08 Thread Vincent Veyron
Le dimanche 07 avril 2013 à 14:53 +0900, Satoshi Nagayasu a écrit : > Is there any good guide to build such 3rd-party contrib/extention > on Windows, particularly to work with EDB distribution? Or do you have > any experience which can be shared? No personal experience as I don't do Windows, but

Re: [GENERAL] Hosting PG on AWS in 2013

2013-04-08 Thread Vincent Veyron
Le dimanche 07 avril 2013 à 11:19 -0700, Ben Chobot a écrit : > > Overall I won't say that you can get amazing DB performance inside > AWS, but you can certainly get reasonable performance with enough > PIOPs volumes and memory, and while the on-demand cost is absurd > compared to what you can bu

Re: [GENERAL] how to create materialized view in postgresql 8.3

2013-04-08 Thread Michael Paquier
On Mon, Apr 8, 2013 at 4:57 PM, Gavin Flower wrote: > On 08/04/13 18:58, Zahid Quadri wrote: > > > is it possible to created materialized view in postgresql 8.3 if yes > please provide some sample. > > 8.3 is no longer supported > Zahid, I think that you have mistaken 8.3 and 9.3. Materialized vi

Re: [GENERAL] [Solved] Corrupt indexes on slave when using pg_bulkload on master

2013-04-08 Thread Takashi Ohnishi
Hi, James. I'm a member of pg_bulkload developer community. Thank you for the bug report. Sorry to become late... We have released the new version of pg_bulkload , 3.1.3 where the reported bug is fixed. I hope this new version will help you. Regards. Takashi Ohnishi -Origin

Re: [GENERAL] how to create materialized view in postgresql 8.3

2013-04-08 Thread Gavin Flower
On 08/04/13 18:58, Zahid Quadri wrote: is it possible to created materialized view in postgresql 8.3 if yes please provide some sample. 8.3 is no longer supported

[GENERAL] how to create materialized view in postgresql 8.3

2013-04-08 Thread Zahid Quadri
is it possible to created materialized view in postgresql 8.3 if yes please provide some sample.