Re: [GENERAL] Using 'WITH SELECT' Results Do Not Match 'SELECT FROM ' Results

2017-07-03 Thread Adrian Klaver
On 07/03/2017 05:20 PM, Jerry Regan wrote: Adrian, Thank you for your reply! I apologize in advance for not being detailed below. Hard to do from my phone. I did have to move the 'ORDER BY', but not outside the 'WITH'. My first workaround parenthesized the select containing the 'ORDER BY', fo

Re: [GENERAL] Using 'WITH SELECT' Results Do Not Match 'SELECT FROM ' Results

2017-07-03 Thread Adrian Klaver
On 07/02/2017 10:33 AM, Jerry Regan wrote: For reasons beyond my control, I am using Postgresql 9.4 on a MacBookPro (development system). I use pgadminIII and psql for clients (I tried and didn’t like the pgadmin4 UI; pg_dump, pg_restore also seem to be dumbed down). My question: I have some

Re: [GENERAL] duplicate key value violates unique constraint and duplicated records

2017-07-03 Thread Timokhin Maxim
Sure, here it is. pg_basebackup -h servername -R -P -D /data/upgrade/94 -U pgsql -v —xlog-method=stream —checkpoint=fast /usr/pgsql-9.5/bin/initdb -D /data/upgrade/95/ —encoding=utf8 —locale=ru_RU.utf8 —lc-collate=ru_RU.utf8 —lc-ctype=ru_RU.utf8 —lc-messages=en_US.utf8 Then updating: /usr/pgs

Re: [GENERAL] duplicate key value violates unique constraint and duplicated records

2017-07-03 Thread Timokhin Maxim
Yes, you are right. It's just a typo. -- Пожалуйста!Используйте кнопку "ответить всем".Не удаляйте историю переписки.Спасибо. С уважением, Timokhin 'maf' Maxim   30.06.2017, 02:38, "Adrian Klaver" :On 06/29/2017 02:28 AM, Timokhin Maxim wrote: Hello. We are in process moving to new db from 9.4.8 ->

Re: [GENERAL] duplicate key value violates unique constraint and duplicated records

2017-07-03 Thread Timokhin Maxim
BTW, we are moving using: pg_basebackup -h servername -R -P -D /data/upgrade/94 -U pgsql -v —xlog-method=stream —checkpoint=fast After that we are upping version to 9.6.3. I've looked through the documentation https://postgrespro.ru/docs/postgrespro/9.6/app-pgbasebackup and didn't find details

Re: [GENERAL] duplicate key value violates unique constraint and duplicated records

2017-07-03 Thread Timokhin Maxim
Hello! Yes, it looks like a bug or an index corruption. Now, I'm going to drop an index, find and fix duplicates, and create index again.But I would do it on 9.6.3 because there is a great feature ''max_parallel_workers_per_gather" there.Well, see what will happen. -- Пожалуйста!Используйте кнопку

[GENERAL] Using 'WITH SELECT' Results Do Not Match 'SELECT FROM ' Results

2017-07-03 Thread Jerry Regan
For reasons beyond my control, I am using Postgresql 9.4 on a MacBookPro (development system). I use pgadminIII and psql for clients (I tried and didn’t like the pgadmin4 UI; pg_dump, pg_restore also seem to be dumbed down). My question: I have some performance test results in table cor_duration

[GENERAL] EXCEPTION handling from с function

2017-07-03 Thread Арсен Арутюнян
Hello please assist How i can handle nowait EXCEPTION from c function; select for update nowait SPI_execute_plan(UpdateStat, Values, NULL, false, 1); Arsen  -- Арсен Арутюнян

[GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-03 Thread rajan
Thanks, Jeff. Now I am going back to my old question. Even though *Session 2* fails to update with UPDATE 0 message, its txid is saved in xmax of updated(by *Session 1*) tuple. As it becomes an old txid, how come new txids are able to view it? - -- Thanks, Rajan. -- View this message in c

Re: [GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-03 Thread Jeff Janes
On Mon, Jul 3, 2017 at 3:02 AM, rajan wrote: > Thanks for the explanation. > > will I be able to view the information using this function, > SELECT * FROM heap_page_items(get_raw_page('testnumbers', 0)); > > Also, please let me know which column I should refer for viewing the > pointer. > It is

[GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-03 Thread rajan
Thanks for the explanation. will I be able to view the information using this function, SELECT * FROM heap_page_items(get_raw_page('testnumbers', 0)); Also, please let me know which column I should refer for viewing the pointer. - -- Thanks, Rajan. -- View this message in context: http://

Re: [GENERAL] Accessing DB2 tables from postgresql

2017-07-03 Thread Swapnil Vaze
Hello, Thanks for help!! I am following up on that existing thread. Thanks, Swapnil Vaze On Wed, Jun 28, 2017 at 7:01 PM, Adrian Klaver wrote: > On 06/28/2017 01:28 AM, Swapnil Vaze wrote: > >> Hello, >> >> I dropped and recreated foreign table with odbc_database option. Also >> tried to use