Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-01 Thread Jeff Janes
On Sun, Apr 30, 2017 at 4:37 AM, Thomas Güttler < guettl...@thomas-guettler.de> wrote: > Is is possible that PostgreSQL will replace these building blocks in the > future? > > - redis (Caching) > PostgreSQL has its own caching. It might not be quite as effective as redis', but you can us it if

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
John, On Mon, May 1, 2017 at 9:38 PM, John R Pierce wrote: > On 5/1/2017 5:44 PM, Igor Korot wrote: >> >> >> But I want to build from MSVC. I already have a solution for it. All I >> need is to create a project inside that solution which will build the dll >> and lib files for me. >> >> Or I have

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread John R Pierce
On 5/1/2017 5:44 PM, Igor Korot wrote: But I want to build from MSVC. I already have a solution for it. All I need is to create a project inside that solution which will build the dll and lib files for me. Or I have to use nmake? pretty sure you need to run the top level config script to g

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
Hi, John, On May 1, 2017 8:00 PM, "John R Pierce" wrote: On 5/1/2017 4:28 PM, Igor Korot wrote: > Like I said, I don't have dll, I downloaded a source files and would > like to compile > the code myself from the MSVC. > > And I will use libpg calls directly. > build the postgres server, and

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 05/01/2017 05:04 PM, Max Wang wrote: Hi Adrian, Thank you. The strange things is we only use Python do insert/update/delete and do not run other SQL command. The evidence says otherwise, which leads to: So nothing ever pulls data out of the database with SELECTS? There is no monitoring

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi Adrian, Thank you. The strange things is we only use Python do insert/update/delete and do not run other SQL command. Regards, Max -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, 2 May 2017 9:55 AM To: Max Wang ; pgsql-general@postgresql.org

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Melvin Davidson
On Mon, May 1, 2017 at 7:55 PM, Max Wang wrote: > Hi Melvin, > > > > I already reset id to correct value after this happen. This is a > production database. We could not stop and wait for trouble shooting. I > manually reset sequence of id to correct value. > > > > Below is current result: > > >

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 05/01/2017 04:55 PM, Max Wang wrote: Hi Melvin, I already reset id to correct value after this happen. This is a production database. We could not stop and wait for trouble shooting. I manually reset sequence of id to correct value. I would grep for setval in any of the code you have touc

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread John R Pierce
On 5/1/2017 4:28 PM, Igor Korot wrote: Like I said, I don't have dll, I downloaded a source files and would like to compile the code myself from the MSVC. And I will use libpg calls directly. build the postgres server, and it will generate the DLL, then link to that with your own apps. sta

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi Melvin, I already reset id to correct value after this happen. This is a production database. We could not stop and wait for trouble shooting. I manually reset sequence of id to correct value. Below is current result: sequence_name | xx_id_seq last_value| 190996 start_value | 1 in

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 05/01/2017 04:29 PM, Max Wang wrote: Hi Adrian, I checked and found is_cycled | f Hmm. A possible cause: test=# insert into serial_test (fld_1) values ('test'); INSERT 0 1 test=# insert into serial_test (fld_1) values ('test2'); INSERT 0 1 test=# insert into serial_test (fld_1) value

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Melvin Davidson
On Mon, May 1, 2017 at 7:45 PM, Adrian Klaver wrote: > On 05/01/2017 04:36 PM, Max Wang wrote: > >> Hi Amitabh, >> >> I mean the serial sequence that controls the id value has been set to 1 >> for all tables. That's why I got the duplicate key value error when I tried >> to insert the new record

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 05/01/2017 04:36 PM, Max Wang wrote: Hi Amitabh, I mean the serial sequence that controls the id value has been set to 1 for all tables. That's why I got the duplicate key value error when I tried to insert the new record to table. So what does the sequence query show? As an example in p

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi Amitabh, I mean the serial sequence that controls the id value has been set to 1 for all tables. That's why I got the duplicate key value error when I tried to insert the new record to table. Thanks. Regards, Max -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Melvin Davidson
On Mon, May 1, 2017 at 7:31 PM, Adrian Klaver wrote: > On 05/01/2017 04:11 PM, Max Wang wrote: > >> Hi Amitabh, >> >> >> >> Thank you for suggestion. We did not reach the limit of serial type. >> Some tables only have hundreds of rows. >> > > It would helpful if you ran the query I showed in my p

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 05/01/2017 04:11 PM, Max Wang wrote: Hi Amitabh, Thank you for suggestion. We did not reach the limit of serial type. Some tables only have hundreds of rows. It would helpful if you ran the query I showed in my previous post on one the sequences just so we can see. From subsequent post

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi Adrian, I checked and found is_cycled | f Regards, Max -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Tuesday, 2 May 2017 9:16 AM To: Max Wang ; pgsql-general@postgresql.org Subject: Re: [GENERAL] all serial type was changed to 1 On 05/01/2017

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
Hi, Jihn, On Mon, May 1, 2017 at 6:33 PM, John R Pierce wrote: > On 5/1/2017 3:08 PM, Igor Korot wrote: >> >> Also - I want to create a project inside my MSVC 2010 solution and >> compile. >> Is there anything I need besides src/include and src/interface/libpg? > > > if you're using .NET stuff li

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Rob Sargent
Every row? On 05/01/2017 05:17 PM, Max Wang wrote: Sorry. I mean all tables’ id column were reset to 1. Thanks. *From:*Melvin Davidson [mailto:melvin6...@gmail.com] *Sent:* Tuesday, 2 May 2017 9:14 AM *To:* Max Wang *Cc:* Adrian Klaver ; pgsql-general@postgresql.org *Subject:* Re: [GENERA

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Sorry. I mean all tables’ id column were reset to 1. Thanks. From: Melvin Davidson [mailto:melvin6...@gmail.com] Sent: Tuesday, 2 May 2017 9:14 AM To: Max Wang Cc: Adrian Klaver ; pgsql-general@postgresql.org Subject: Re: [GENERAL] all serial type was changed to 1 On Mon, May 1, 2017 at 7:0

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 05/01/2017 04:08 PM, Max Wang wrote: Hi Adrian, Only sequences (id) reset to 1. Then per Amitabh Kant's suggestion take a look at the cycle setting for the sequences. For sequence named ts_stamp_test_id_seq: test=# select * from ts_stamp_test_id_seq ; -[ RECORD 1 ]-+

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Melvin Davidson
On Mon, May 1, 2017 at 7:08 PM, Max Wang wrote: > Hi Adrian, > > Only sequences (id) reset to 1. > > Regards, > Max > > -Original Message- > From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] > Sent: Monday, 1 May 2017 11:30 PM > To: Max Wang ; pgsql-general@postgresql.org > Subject:

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi Amitabh, Thank you for suggestion. We did not reach the limit of serial type. Some tables only have hundreds of rows. Regards, Max From: Amitabh Kant [mailto:amitabhk...@gmail.com] Sent: Monday, 1 May 2017 7:58 PM To: Max Wang Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] all seri

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi Adrian, Only sequences (id) reset to 1. Regards, Max -Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Monday, 1 May 2017 11:30 PM To: Max Wang ; pgsql-general@postgresql.org Subject: Re: [GENERAL] all serial type was changed to 1 On 04/30/2017 10:51 PM

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Max Wang
Hi David, Thanks for suggestion. We use PostgreSQL 9.5. And we did not import or bulk loaded data to these tables. Regards, Max -Original Message- From: David Rowley [mailto:david.row...@2ndquadrant.com] Sent: Monday, 1 May 2017 11:05 PM To: Max Wang Cc: pgsql-general@postgresql.org

Re: [GENERAL] Compatibility of libpg

2017-05-01 Thread John R Pierce
On 5/1/2017 3:08 PM, Igor Korot wrote: Also - I want to create a project inside my MSVC 2010 solution and compile. Is there anything I need besides src/include and src/interface/libpg? if you're using .NET stuff like adodb or oledb, you'll want the npgsql .net stuff for postgres. if you're d

[GENERAL] Compatibility of libpg

2017-05-01 Thread Igor Korot
Hi, I just downloaded a latest (9.6.2) version of libpg. I am wondering - what is the lowest version of PostgreSQL it will be able to connect? Also - I want to create a project inside my MSVC 2010 solution and compile. Is there anything I need besides src/include and src/interface/libpg? Thank y

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-01 Thread Bill Moran
On Mon, 1 May 2017 22:05:03 +0200 Thomas Güttler wrote: > > > > There's a well-written article I saw recently that directly addresses > > your question ... I'm too lazy to find it, but google will probably > > turn it up for you. > > I tried to find it, but failed. Can you give me some keywords

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-01 Thread Bill Moran
On Mon, 1 May 2017 22:02:15 +0200 Thomas Güttler wrote: > Leaving two things open: > > - blob storage > - redis/caching I've used Postgres for both of these purposes, and at the load level we were experiencing at the time, it worked fine. We later implemented Redis when our caching requiremen

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-01 Thread Sven R. Kunze
On 30.04.2017 16:25, Steve Atkins wrote: You can use postgresql for caching, but caches don't require the data durability that a database offers, and can be implemented much more efficiently. I for one can understand Thomas' need for a single solution. Just recently I needed a cache which was s

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-01 Thread Thomas Güttler
Am 30.04.2017 um 17:09 schrieb Bill Moran: > On Sun, 30 Apr 2017 13:37:02 +0200 > Thomas Güttler wrote: > >> Is is possible that PostgreSQL will replace these building blocks in the >> future? >> >> - redis (Caching) >> - rabbitmq (amqp) >> - s3 (Blob storage) >> >> One question is "is it p

Re: [GENERAL] Can PG replace redis, amqp, s3 in the future?

2017-05-01 Thread Thomas Güttler
Am 30.04.2017 um 15:39 schrieb Thomas Delrue: > On April 30, 2017 1:37:02 PM GMT+02:00, "Thomas Güttler" > wrote: >> Is is possible that PostgreSQL will replace these building blocks in >> the future? >> >> - redis (Caching) >> - rabbitmq (amqp) >> - s3 (Blob storage) > > These are three very di

Re: [GENERAL] Logical replication

2017-05-01 Thread Adrian Klaver
On 05/01/2017 09:25 AM, Peter Eisentraut wrote: On 5/1/17 10:32, Adrian Klaver wrote: On 04/30/2017 09:07 AM, Adrian Klaver wrote: I have started looking at the logical replication feature in Postgres 10. One thing I have no been able to determine is the interoperability between it and pglogica

Re: [GENERAL] Logical replication

2017-05-01 Thread Peter Eisentraut
On 5/1/17 10:32, Adrian Klaver wrote: > On 04/30/2017 09:07 AM, Adrian Klaver wrote: >> I have started looking at the logical replication feature in Postgres >> 10. One thing I have no been able to determine is the interoperability >> between it and pglogical(www.2ndquadrant.com/en/resources/pglogi

Re: [GENERAL] GENERAL : [Can somebody explain about Base directory]

2017-05-01 Thread Melvin Davidson
On Mon, May 1, 2017 at 11:41 AM, VENKTESH GUTTEDAR < venkteshgutte...@gmail.com> wrote: > Hello All, > > Base directory is consuming to much memory, leading to no space on > server and stopping the application > > Somebody please explain why it takes so much memory and is it safe to > dele

Re: [GENERAL] GENERAL : [Can somebody explain about Base directory]

2017-05-01 Thread Adrian Klaver
On 05/01/2017 08:41 AM, VENKTESH GUTTEDAR wrote: Hello All, Base directory is consuming to much memory, leading to no space on server and stopping the application I am going to say that you mean that the base directory is consuming too much disk space, correct? If not can you be specifi

Re: [GENERAL] GENERAL : [Can somebody explain about Base directory]

2017-05-01 Thread Scott Mead
On Mon, May 1, 2017 at 11:41 AM, VENKTESH GUTTEDAR < venkteshgutte...@gmail.com> wrote: > Hello All, > > Base directory is consuming to much memory, leading to no space on > server and stopping the application > > Somebody please explain why it takes so much memory and is it safe to > dele

[GENERAL] GENERAL : [Can somebody explain about Base directory]

2017-05-01 Thread VENKTESH GUTTEDAR
Hello All, Base directory is consuming to much memory, leading to no space on server and stopping the application Somebody please explain why it takes so much memory and is it safe to delete those files.? -- Regards : Venktesh Guttedar.

Re: [GENERAL] Logical replication

2017-05-01 Thread Adrian Klaver
On 04/30/2017 09:07 AM, Adrian Klaver wrote: I have started looking at the logical replication feature in Postgres 10. One thing I have no been able to determine is the interoperability between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I know the one is derived from the other

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Adrian Klaver
On 04/30/2017 10:51 PM, Max Wang wrote: Hi All, We have a PostgreSQL database. There are 26 tables and we use serial type as primary key. We had a insert error as “duplicate key value violates unique constraint, DETAIL: Key (id)=(1) already exists.” one weeks ago. I checked and found all tab

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread David Rowley
On 1 May 2017 at 17:51, Max Wang wrote: > We have a PostgreSQL database. There are 26 tables and we use serial type as > primary key. We had a insert error as “duplicate key value violates unique > constraint, DETAIL: Key (id)=(1) already exists.” one weeks ago. I checked > and found all tables’

Re: [GENERAL] all serial type was changed to 1

2017-05-01 Thread Amitabh Kant
On Mon, May 1, 2017 at 11:21 AM, Max Wang wrote: > Hi All, > > > > We have a PostgreSQL database. There are 26 tables and we use serial type > as primary key. We had a insert error as “duplicate key value violates > unique constraint, DETAIL: Key (id)=(1) already exists.” one weeks ago. I > che