Re: [GENERAL] Linux equivalent library for "postgres.lib" from Windows

2016-11-07 Thread Michael Paquier
On Tue, Nov 8, 2016 at 1:29 PM, John R Pierce wrote: > I am not sure what this postgres.lib is, what are the functions you're using > ? It contains references to all the exposed functions of the backend on Windows. Using something like dumpbin /exports postgres.lib would show exactly that if I re

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread amul sul
On Tue, Nov 8, 2016 at 5:36 AM, Andreas Joseph Krogh wrote: > > > I don't see what you mean. It forces dump of Blobs if we didn't use -B and > if we include everything in the dump, which seems good to me. What did you > try that didn't work as expected? > > > I guess what he means is that if -B is

Re: [GENERAL] Linux equivalent library for "postgres.lib" from Windows

2016-11-07 Thread John R Pierce
On 11/7/2016 7:51 PM, Michael Paquier wrote: There is no need to go down to this level of details perhaps? You could just use the PGXS infrastructure to guess it for you. +1 I forgot to mention PGXS, that provides a portable method of building server-side extensions. See https://www.post

Re: [GENERAL] Linux equivalent library for "postgres.lib" from Windows

2016-11-07 Thread John R Pierce
On 11/6/2016 9:28 PM, Gadamsetty, Kiran wrote: I am new to the product and in windows “postgres.lib” provides certain functions which we are using in windows for creating extensions. Now I am porting the project to Linux and there no straight library with this name in Linux binaries packages

Re: [GENERAL] Linux equivalent library for "postgres.lib" from Windows

2016-11-07 Thread Michael Paquier
On Mon, Nov 7, 2016 at 2:28 PM, Gadamsetty, Kiran wrote: > I am new to the product and in windows “postgres.lib” provides certain > functions which we are using in windows for creating extensions. > > Now I am porting the project to Linux and there no straight library with > this name in Linux bin

[GENERAL] Linux equivalent library for "postgres.lib" from Windows

2016-11-07 Thread Gadamsetty, Kiran
Hi, I am new to the product and in windows "postgres.lib" provides certain functions which we are using in windows for creating extensions. Now I am porting the project to Linux and there no straight library with this name in Linux binaries packages. Can someone please advise the equivalent lib

[GENERAL] Fwd: Creating multiple instances of postresql on Windows environment

2016-11-07 Thread kaustubh kelkar
Hi , I am a PostgreSQL user who wants to create multiple instances of PostgreSQL database server. I am using PostgreSQL 9.4 and above. I tried to create more than 2 instances on Linux environment in which I was successful. But, for windows environment, I tried with the help of pgAdmin4 and with t

Re: [GENERAL] High load average every 105 minutes

2016-11-07 Thread Nhan Nguyen
I forgot to mention, my DB is running on a c4.xlarge instance. Nhan Nguyen System Engineer MB: (+84) 934 008 031 Skype: live:ducnhan813 > On Nov 7, 2016, at 5:03 PM, Chris Mair wrote: > > >>> with AWS, your system is sharing the vendors virtual machine environment >>> with other customers, a

Re: [GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread Michael Paquier
On Mon, Nov 7, 2016 at 9:32 PM, Tom DalPozzo wrote: > I'm using 9.5.3 . I had read about that bug but I didn't know that > wal_level=archive is equivalent to hot_standby from this point of view! I > guess it's equivalent in 9.5.3 too. No, this only applies to 9.6 and onward as a result of the int

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread Andreas Joseph Krogh
På mandag 07. november 2016 kl. 22:01:41, skrev Guillaume Lelarge < guilla...@lelarge.info >: 2016-11-07 7:06 GMT+01:00 amul sul mailto:sula...@gmail.com>>: On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge mailto:guilla...@lelarge.info>> wrote: >> >> Agreed. I was

Re: [GENERAL] Exclude pg_largeobject form pg_dump

2016-11-07 Thread Guillaume Lelarge
2016-11-07 7:06 GMT+01:00 amul sul : > On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge > wrote: > >> > >> Agreed. I was afraid of that, but for some reason, didn't find that. > I'll > >> fix this. > > > > > > Fixed in v4. > > > > This fix is broken. > > 70 - if (dopt.include_everything && !

Re: [GENERAL] Abscence of synonym

2016-11-07 Thread Andy Colson
On 11/7/2016 1:39 PM, Rakesh Kumar wrote: I need some ideas here. Let us say we have a bunch of tables, called a,b,c,d. We will get a batch of data in files which need to be processed. At the end of processing, the tables will get a fresh set of data. The problem we would like to solve is to

[GENERAL] Abscence of synonym

2016-11-07 Thread Rakesh Kumar
I need some ideas here. Let us say we have a bunch of tables, called a,b,c,d. We will get a batch of data in files which need to be processed. At the end of processing, the tables will get a fresh set of data. The problem we would like to solve is to allow access to the tables while they are

Re: [GENERAL] Questions on Post Setup MASTER and STANDBY replication - Postgres9.1

2016-11-07 Thread Joanna Xu
Jim Nasby [mailto:jim.na...@bluetreble.com] wrote: >On 11/2/16 2:49 PM, Joanna Xu wrote: >> The replication is verified and works. My questions are what's the >> reason causing "cp: cannot stat >> `/opt/postgres/9.1/archive/00010003': No such file or >> directory" on STA

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
On Nov 7, 2016 3:34 PM, "Tom Lane" wrote: > > Arthur Silva writes: > > We recently started looking into a long standing ticket to change some > > foreign keys referential actions from CASCADE to RESTRICT for our own > > safety. Everything else in the FK stays the same. > > The problem is that run

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
On Nov 7, 2016 3:29 PM, "Adrian Klaver" wrote: > > On 11/07/2016 02:09 AM, Arthur Silva wrote: >> >> Hi all, we're running a few Pg databases in production. >> >> Ubuntu 14.04 x64 >> 32 x64 cores >> 64GB to 256GB memory, depending on cluster >> PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compile

Re: [GENERAL] Surviving connections after internet problem

2016-11-07 Thread Albe Laurenz
Durumdara wrote: > Linux server, 9.4 PG, Windows clients far-far away. > > They called us that they had an "internet reset" at 13.00, but many client > locks are alive now > (14:00). > I checked server status, and and saw 16 connections. > > In Windows PG server I read about keepalive parameters

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Tom Lane
Arthur Silva writes: > We recently started looking into a long standing ticket to change some > foreign keys referential actions from CASCADE to RESTRICT for our own > safety. Everything else in the FK stays the same. > The problem is that running a query like the one bellow takes an exclusive > l

Re: [GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Adrian Klaver
On 11/07/2016 02:09 AM, Arthur Silva wrote: Hi all, we're running a few Pg databases in production. Ubuntu 14.04 x64 32 x64 cores 64GB to 256GB memory, depending on cluster PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit FusionIO storage We r

Re: [GENERAL] How to hint 2 coulms IS NOT DISTINCT FROM each other

2016-11-07 Thread Merlin Moncure
On Fri, Nov 4, 2016 at 9:38 AM, Alban Hertroys wrote: > On 4 November 2016 at 14:41, Merlin Moncure wrote: >> On Fri, Nov 4, 2016 at 8:08 AM, Kim Rose Carlsen wrote: >>> The nulls are generated by something like this >>> SELECT c.circuit_id, >>>cc.customer_id >>>F

Re: [GENERAL] Database Recovery from Corrupted Dump or Raw database table file.

2016-11-07 Thread Howard News
On 07/11/2016 13:44, Vick Khera wrote: On Mon, Nov 7, 2016 at 8:23 AM, Howard News wrote: pg_restore: executing SEQUENCE SET example_seq pg_restore: processing data for table example_table pg_restore: [compress_io] ** crash ** What crashes? the pg_restore process or the backend server? Th

Re: [GENERAL] Database Recovery from Corrupted Dump or Raw database table file.

2016-11-07 Thread Vick Khera
On Mon, Nov 7, 2016 at 8:23 AM, Howard News wrote: > pg_restore: executing SEQUENCE SET example_seq > pg_restore: processing data for table example_table > pg_restore: [compress_io] > > ** crash ** What crashes? the pg_restore process or the backend server? -- Sent via pgsql-general mailing li

Re: [GENERAL] Database Recovery from Corrupted Dump or Raw database table file.

2016-11-07 Thread Howard News
On 07/11/2016 13:12, Albe Laurenz wrote: Howard News wrote: I have a raid catastrophe which has effectively blitzed a cluster data directory. I have several pg_dump backups but these will not restore cleanly. I assume the disk has been failing for some time and the backups are of the corrupte

[GENERAL] Documentation archive links broken for 6.3 up to 7.1

2016-11-07 Thread Daniel Westermann
Hi, just noticed that the links from 6.3 to 7.1 are broken here: https://www.postgresql.org/docs/manuals/archive/ Regards Daniel

Re: [GENERAL] Database Recovery from Corrupted Dump or Raw database table file.

2016-11-07 Thread Albe Laurenz
Howard News wrote: > I have a raid catastrophe which has effectively blitzed a cluster data > directory. I have several pg_dump backups but these will not restore > cleanly. I assume the disk has been failing for some time and the > backups are of the corrupted database. > > Using a selective pg_

[GENERAL] Surviving connections after internet problem

2016-11-07 Thread Durumdara
Hello! Linux server, 9.4 PG, Windows clients far-far away. They called us that they had an "internet reset" at 13.00, but many client locks are alive now (14:00). I checked server status, and and saw 16 connections. In Windows PG server I read about keepalive parameters which are control and re

[GENERAL] Database Recovery from Corrupted Dump or Raw database table file.

2016-11-07 Thread Howard News
Hi all, I have a raid catastrophe which has effectively blitzed a cluster data directory. I have several pg_dump backups but these will not restore cleanly. I assume the disk has been failing for some time and the backups are of the corrupted database. Using a selective pg_restore on the du

Re: [GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread Tom DalPozzo
I'm using 9.5.3 . I had read about that bug but I didn't know that wal_level=archive is equivalent to hot_standby from this point of view! I guess it's equivalent in 9.5.3 too. Regards Pupillo 2016-11-07 13:26 GMT+01:00 Michael Paquier : > On Mon, Nov 7, 2016 at 9:21 PM, Tom DalPozzo wrote: >

Re: [GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread Michael Paquier
On Mon, Nov 7, 2016 at 9:21 PM, Tom DalPozzo wrote: > I know that, but with neither database activity or chekpoint, it doesn't > force anything. The fact is that there are checkpoints being executed every > checkpoint_timeout, and I don't understand why as if no WAL has been written > we should no

Re: [GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread Michael Paquier
On Mon, Nov 7, 2016 at 9:14 PM, amul sul wrote: > On Mon, Nov 7, 2016 at 4:20 PM, Tom DalPozzo wrote: >> I have: >> checkpoint_timeout = 2min >> wal_level = archive >> archive_mode=on >> archive_timeout = 30 >> >> With NO dbase activity, I see the WAL being modified every 2min (and, >> consequent

Re: [GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread Tom DalPozzo
I know that, but with neither database activity or chekpoint, it doesn't force anything. The fact is that there are checkpoints being executed every checkpoint_timeout, and I don't understand why as if no WAL has been written we should not care about passing the timeout. Regards Pupillo 2016-1

Re: [GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread amul sul
On Mon, Nov 7, 2016 at 4:20 PM, Tom DalPozzo wrote: > Hi, > I have: > checkpoint_timeout = 2min > wal_level = archive > archive_mode=on > archive_timeout = 30 > > With NO dbase activity, I see the WAL being modified every 2min (and, > consequently, one WAL file archived every 2min too ). > > Is it

[GENERAL] Re: What is the best thing to do with PUBLIC schema in Postgresql database

2016-11-07 Thread Albe Laurenz
Patricia Hu wrote: > Since it could potentially be a security loop hole. So far the action taken > to address it falls into > these two categories: > > drop the PUBLIC schema altogether. One of the concerns is with some of > the system objects that > have been exposed through PUBLIC schema p

[GENERAL] checkpoint_timout with no WAL activity

2016-11-07 Thread Tom DalPozzo
Hi, I have: checkpoint_timeout = 2min wal_level = archive archive_mode=on archive_timeout = 30 With NO dbase activity, I see the WAL being modified every 2min (and, consequently, one WAL file archived every 2min too ). Is it right? I read: "If no WAL has been written since the previous checkpoint

[GENERAL] Changing foreign key referential actions in big databases

2016-11-07 Thread Arthur Silva
Hi all, we're running a few Pg databases in production. Ubuntu 14.04 x64 32 x64 cores 64GB to 256GB memory, depending on cluster PostgreSQL 9.3.9 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit FusionIO storage We recently started looking into a long standing t

Re: [GENERAL] Dynamic execution returning large result sets

2016-11-07 Thread Emrul
Read up on refcursors - exactly what I wanted, thank you Adrian! -- View this message in context: http://postgresql.nabble.com/Dynamic-execution-returning-large-result-sets-tp5929177p5929211.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general

Re: [GENERAL] High load average every 105 minutes

2016-11-07 Thread Chris Mair
with AWS, your system is sharing the vendors virtual machine environment with other customers, and performance is pretty much out of your control. I found no strange processes or queries while load average was at peak. IO also didn't change. Some more slow queries were logged, but not many.

Re: [GENERAL] High load average every 105 minutes

2016-11-07 Thread Chris Mair
with AWS, your system is sharing the vendors virtual machine environment with other customers, and performance is pretty much out of your control. I found no strange processes or queries while load average was at peak. IO also didn't change. Some more slow queries were logged, but not many.

Re: [GENERAL] High load average every 105 minutes

2016-11-07 Thread Chris Mair
with AWS, your system is sharing the vendors virtual machine environment with other customers, and performance is pretty much out of your control. I found no strange processes or queries while load average was at peak. IO also didn't change. Some more slow queries were logged, but not many.