Re: [GENERAL] How can I get first day date of the previous month ?

2014-06-20 Thread Arup Rakshit
Thanks for your answer. How to get the first day date of last 6 months from now then will be : yelloday_development=# select date_trunc('month', now()) - interval '5 month' as first_month;         first_month         ---  2014-01-01 00:00:00+05:30 (1 row) Is it correct ?

[GENERAL] Strange Error in postgresql 8.4

2014-06-20 Thread Dick Kniep
Hi list, We have been using Postgresql for more than a decade now. Never had any real problems. Thank you very much for this great product. Now recently I have noticed a strange problem. Below is a traceback of a python program using psycopg and this correlates with the postgresql log below th

Re: [GENERAL] How can I get first day date of the previous month ?

2014-06-20 Thread Alban Hertroys
On 20 June 2014 09:11, Arup Rakshit wrote: > Thanks for your answer. How to get the first day date of last 6 months from > now then will be : > > yelloday_development=# select date_trunc('month', now()) - interval '5 > month' as first_month; > first_month > --- > 2

Re: [GENERAL] pg_restore: custom archiver unexpected end of file , ERROR: missing data for column

2014-06-20 Thread Khangelani Gama
> Now you can edit the dump and attempt to restore it until it succeeds > on a different system, after which you know for certain that your data > matches at least your integrity constraints. > > That makes sense to me, thanks Is there is an easier or better way > to edit the binary dump file?

Re: [GENERAL] PostgreSQL 9.2.4 + CentOS 6.5 64 bit - segfault error in initdb

2014-06-20 Thread Bhushan Pathak
Have not faced any issues with the rhel6 RPMs. Thanks for your time & help. Regards Bhushan Pathak On Tue, Jun 10, 2014 at 4:00 PM, Bhushan Pathak wrote: > I will try the the RPMs from the rhel 6 link & post updates. > > Thanks > Bhushan Pathak > > > On Mon, Jun 9, 2014 at 8:06 PM, Adrian Klav

[GENERAL] Postgresql not getting assigned memory

2014-06-20 Thread Oliver
Hello, I'm new in postgresql, I'm sorry if I do something bad. Default value or shared_buffers is 128MB, I have a dedicated server for postgresql with 8GB RAM. I've changed shared_buffers value to 2048MB and uncommented the entry in postgresql.conf. It shows now: # - Memory - shared_buffers = 204

Re: [GENERAL] Postgresql not getting assigned memory

2014-06-20 Thread Abdul Sayeed
Hi, Can you please check the output of below command: postgres=# show shared_buffers ; Thanks & Regards, Abdul Sayeed System Engineer The Postgres Database Company Are you updated: Latest version of Postgres Plus Advanced Server are 8.4.19.42, 9.0.16.34, 9.1.12.20, 9.2.8.19 and 9.3.4.10 To

Re: [GENERAL] Postgresql not getting assigned memory

2014-06-20 Thread Oliver
Thank you very much to all. postgres=# show shared_buffers; shared_buffers 2GB (1 row) Is it ok then, isn't it? DB hasn't activity now because it is a new instance, top command indicates only 350MB of used memory .. I understand that postgresql could reach until 2GB of server m

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-20 Thread Merlin Moncure
On Fri, Jun 20, 2014 at 12:58 AM, Erik van Zijst wrote: > On Thu, Jun 19, 2014 at 10:10 PM, Erik van Zijst > wrote: >> On Thu, Jun 19, 2014 at 3:57 PM, Merlin Moncure wrote: >>> In your case user% is dominating system load. Along with the high cs >>> this is really suggesting spinlock contentio

Re: [GENERAL] Postgresql not getting assigned memory

2014-06-20 Thread Abdul Sayeed
Hi, It shows 2GB. It means it is updated. Shared_buffer memory is used at postgresql database level, It will consume while doing operation such as INSERT, UPDATE, DELETE and other maintenance task (VACUUM/VACUUM FULL). Thanks, Abdul On Fri, Jun 20, 2014 at 6:28 PM, Oliver wrote: > Thank you

Re: [GENERAL] Postgresql not getting assigned memory

2014-06-20 Thread Kevin Grittner
Oliver wrote: > DB hasn't activity now because it is a new instance, top command > indicates only 350MB of used memory .. I understand that > postgresql could reach until 2GB of server memory as total, > correct? It's usually much better to copy/paste what you're talking about than to just refer

Re: [GENERAL] Strange Error in postgresql 8.4

2014-06-20 Thread Adrian Klaver
On 06/20/2014 01:18 AM, Dick Kniep wrote: Hi list, We have been using Postgresql for more than a decade now. Never had any real problems. Thank you very much for this great product. Now recently I have noticed a strange problem. Below is a traceback of a python program using psycopg and this

Re: [GENERAL] pros/cons of using "synchronous commit=off" - AWS in particular

2014-06-20 Thread Merlin Moncure
On Thu, Jun 19, 2014 at 9:24 AM, Larry J Prikockis wrote: > so from the much-loved > https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server page, we have > this: > > " > PostgreSQL can only safely use a write cache if it has a battery backup. See > WAL reliability for an essential introduc

Re: [GENERAL] pros/cons of using "synchronous commit=off" - AWS in particular

2014-06-20 Thread Larry Prikockis
On 06/20/2014 09:41 AM, Merlin Moncure wrote: On Thu, Jun 19, 2014 at 9:24 AM, Larry J Prikockis wrote: so from the much-loved https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server page, we have this: " PostgreSQL can only safely use a write cache if it has a battery backup. See WAL

Re: [GENERAL] max_connections reached in postgres 9.3.3

2014-06-20 Thread Tom Lane
Erik van Zijst writes: > On Thu, Jun 19, 2014 at 3:57 PM, Merlin Moncure wrote: >> In your case user% is dominating system load. Along with the high cs >> this is really suggesting spinlock contention. A 'perf top' is >> essential for identifying the culprit. It's very possible that 9.4 >> wil

Re: [GENERAL] pros/cons of using "synchronous commit=off" - AWS in particular

2014-06-20 Thread Merlin Moncure
On Fri, Jun 20, 2014 at 8:49 AM, Larry Prikockis wrote: > > On 06/20/2014 09:41 AM, Merlin Moncure wrote: >> >> On Thu, Jun 19, 2014 at 9:24 AM, Larry J Prikockis >> wrote: >>> >>> so from the much-loved >>> https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server page, we >>> have >>> this

Re: [GENERAL] Best backup strategy for production systems

2014-06-20 Thread Marti Raudsepp
On Fri, Jun 20, 2014 at 1:47 AM, Borislav Ivanov wrote: > If your database is relatively small, I would recommend > http://www.pgbarman.org/. It does binary backup and will take care of your > WAL files. The laster version of pgbarman can also take backups from a slave > using pgespresso extension

Re: [GENERAL] pros/cons of using "synchronous commit=off" - AWS in particular

2014-06-20 Thread Alvaro Herrera
Larry Prikockis wrote: > ok... so maybe a better question would be: other than cases of power > failure or something else that caused the server to shut down > unexpectedly and uncleanly, what is the actual risk of data loss? In > my case, the possibility of losing a recent transaction or two in >

Re: [GENERAL] How can I get first day date of the previous month ?

2014-06-20 Thread Steve Crawford
On 06/20/2014 12:11 AM, Arup Rakshit wrote: Thanks for your answer. How to get the first day date of last 6 months from now then will be : yelloday_development=# select date_trunc('month', now()) - interval '5 month' as first_month; first_month --- 2014-01-01 00:00:00

Re: [GENERAL] Strange Error in postgresql 8.4

2014-06-20 Thread Steve Crawford
On 06/20/2014 01:18 AM, Dick Kniep wrote: Hi list, ... Now recently I have noticed a strange problem. ... psycopg2.DatabaseError: SSL error: ccs received early Did you try Googling "SSL error: ccs received early"? Like Adrian, I suspect your answer will be found in one of those messages. What

Re: [GENERAL] Postgresql not getting assigned memory

2014-06-20 Thread Jeff Janes
On Fri, Jun 20, 2014 at 4:51 AM, Oliver wrote: > Hello, > I'm new in postgresql, I'm sorry if I do something bad. > Default value or shared_buffers is 128MB, I have a dedicated server for > postgresql with 8GB RAM. I've changed shared_buffers value to 2048MB and > uncommented the entry in postgres

[GENERAL] pgAgent

2014-06-20 Thread enrique.perez
how can i install pgAgent in postgresql 8.4 if mi internet conection don't allow to any program to conect internet. -- View this message in context: http://postgresql.1045698.n5.nabble.com/pgAgent-tp5808135.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent v

Re: [GENERAL] How to store fixed size images?

2014-06-20 Thread Jonathan Vanasco
On Jun 19, 2014, at 11:21 AM, Andy Colson wrote: > I think it depends on how you are going to use them. I, for example, have > lots of images that are served on a web page, after benchmarks I found it was > faster to store them on filesystem and let apache serve them directly. I rarely store

Re: [GENERAL] How can I get first day date of the previous month ?

2014-06-20 Thread Gavin Flower
On 21/06/14 03:12, Steve Crawford wrote: On 06/20/2014 12:11 AM, Arup Rakshit wrote: Thanks for your answer. How to get the first day date of last 6 months from now then will be : yelloday_development=# select date_trunc('month', now()) - interval '5 month' as first_month; first_month --

Re: [GENERAL] How can I get first day date of the previous month?

2014-06-20 Thread Arup Rakshit
On Friday, June 20, 2014 08:12:14 AM you wrote: > Welcome. And yes, it is awesome. I agree. >Being new to the DB No. I worked on Oracle DB earlier days(approx 2 years). But pgsql just 1 month. >and mailing list, > please note that the convention on all PostgreSQL mailing lists is to > post