Re: is single row update improved with function

2017-12-31 Thread Rob Sargent
> On Dec 31, 2017, at 4:31 PM, David Rowley > wrote: > > On 1 January 2018 at 12:06, Rob Sargent wrote: >> I must update 3M of 100M records, with tuple specific modifications. I can >> generate the necessary sql, but I’m wondering if files of simple update >> statements affecting a single r

Re: is single row update improved with function

2017-12-31 Thread Rob Sargent
> On Dec 31, 2017, at 4:31 PM, David Rowley > wrote: > > On 1 January 2018 at 12:06, Rob Sargent wrote: >> I must update 3M of 100M records, with tuple specific modifications. I can >> generate the necessary sql, but I’m wondering if files of simple update >> statements affecting a single r

Re: is single row update improved with function

2017-12-31 Thread David Rowley
On 1 January 2018 at 12:06, Rob Sargent wrote: > I must update 3M of 100M records, with tuple specific modifications. I can > generate the necessary sql, but I’m wondering if files of simple update > statements affecting a single row is more effective than files of a function > call doing the

is single row update improved with function

2017-12-31 Thread Rob Sargent
I must update 3M of 100M records, with tuple specific modifications. I can generate the necessary sql, but I’m wondering if files of simple update statements affecting a single row is more effective than files of a function call doing the same update given the necessary values, including where

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Ibrahim Edib Kokdemir
> > > As I mentioned earlier, if this takes too long, you could only do > > heapallindexed checking once per table (not once per index) by giving > > "indisprimary" as the heapallindexed argument. That way, only primary > > keys would be verified against the heap, which is potentially a lot > > fas

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Peter Geoghegan
On Sun, Dec 31, 2017 at 1:39 PM, Peter Geoghegan wrote: > SELECT bt_index_check(index => c.oid, heapallindexed => true), > c.relname, > c.relpages > FROM pg_index i > JOIN pg_opclass op ON i.indclass[0] = op.oid > JOIN pg_am am ON op.opcmethod = am.oid > JOIN pg_class

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Peter Geoghegan
On Sun, Dec 31, 2017 at 1:10 PM, Ibrahim Edib Kokdemir wrote: > I just installed and used amcheck_next, I have used your sample query on the > git page (changed the schema name) and that listed all indexes different > schemes and produced same outputs like yours with bt_index_check field as > empt

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Ibrahim Edib Kokdemir
Hi Peter, I just installed and used amcheck_next, I have used your sample query on the git page (changed the schema name) and that listed all indexes different schemes and produced same outputs like yours with bt_index_check field as empty, that means no error. Am I doing right? 2017-12-31 16:58

Re: Find duplicates in a column then print Information to a file

2017-12-31 Thread Tom Lane
Rob Sargent writes: > Keep in mind there is a quick write-to-file in psql with ‘\o ’. And > don’t forget to turn it off with ‘\o’ See also "\g filename", for one-shot output. regards, tom lane

Re: Find duplicates in a column then print Information to a file

2017-12-31 Thread Rob Sargent
Keep in mind there is a quick write-to-file in psql with ‘\o ’. And don’t forget to turn it off with ‘\o’ > On Dec 31, 2017, at 12:04 PM, Sherman Willden wrote: > > Thank you for the replies. I will start working on them now. Not a student > but since I now have the time I may look into it. I

Re: Find duplicates in a column then print Information to a file

2017-12-31 Thread Sherman Willden
Thank you for the replies. I will start working on them now. Not a student but since I now have the time I may look into it. I am 71 retired working at Home Depot. I have a collection of CDs by various artists and I have the time to create and maintain my own database concerning these subjects. I r

Re: Find duplicates in a column then print Information to a file

2017-12-31 Thread Francisco Olarte
M, I notice a faint homework smell here ;-> , but the question is nicely asked so: On Sun, Dec 31, 2017 at 7:19 PM, Sherman Willden wrote: ... > SELECT aria FROM aria_precis WHERE aria IN (SELECT aria FROM aria_precis > GROUP BY aria HAVING COUNT(aria)>1); The outer select is fully redundan

Re: Find duplicates in a column then print Information to a file

2017-12-31 Thread Martin Moore
From: Sherman Willden Date: Sunday, 31 December 2017 at 18:19 To: Subject: Find duplicates in a column then print Information to a file Development Platform: Ubuntu 17.10 mainly command line work Tools: perl 5.26 and postgresql 9.6 Goal: Display duplicate aria titles on screen and to a l

Find duplicates in a column then print Information to a file

2017-12-31 Thread Sherman Willden
Development Platform: Ubuntu 17.10 mainly command line work Tools: perl 5.26 and postgresql 9.6 Goal: Display duplicate aria titles on screen and to a local file Database name: arias Table name: aria_precis csv delimiter: the # symbol arias=# \d aria_precis Table "public.aria_precis" Co

Re: Does PostgreSQL check database integrity at startup?

2017-12-31 Thread Stephen Frost
Jan, all, * Jan Wieck (j...@wi3ck.info) wrote: > On Sat, Dec 30, 2017 at 10:27 AM, Stephen Frost wrote: > > The checksums included in PG are page-level and therefore there simply > > isn't one to look at if the file is zero bytes. > > And even if the file wasn't zero bytes you can't tell from th

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Peter Geoghegan
On Sun, Dec 31, 2017 at 1:50 PM, Ibrahim Edib Kokdemir wrote:> * write_cache is disabled > * there is no incorrect work_mem parameter setting. > * logical dump is working, (maybe) no curruption in data. > * there is streaming replication, we do not repeat the error in the > replicas. (replicas in

invalid memory alloc request size 576460752438159360

2017-12-31 Thread Ibrahim Edib Kokdemir
Hi, We are getting same error a lot for more than 1 days from different schemas in the same db. < user=myuser db=mydb host=mydbip pid=18883 app=[unknown] time=2017-12-31 14:28:16.056 +03 > ERROR: invalid memory alloc request size 576460752438159360 CentOS Linux release 7.4.1708 (Core) DB version