[GENERAL] Timezone locale consistency for functional indexes

2017-06-12 Thread Olav Gjerde
I have a table that I try create an functional index on like this: CREATE INDEX my_index_name ON opening_hours ( opening_hours_type, EXTRACT(YEAR FROM date), EXTRACT(MONTH FROM date) ) But I get the following error: functions in index expression must be marked IMMUTABLE But if I

Re: [GENERAL] Timezone locale consistency for functional indexes

2017-06-12 Thread Olav Gjerde
I figured out the issue, it was as simple as some developers used the default in Java's Hibernate which created the timestamp columns without time zone. Anyway I guess this is the correct approach that also take summer time into consideration? And using the immutable function wrapper is wrong?

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Harry Ambrose
Hi, pls tell me, I am currently running 2nd run in my box, (New attempt 2), and > its in the "Attempting vacuum" phase. > What is it supposed to do next? > I got no errors , it has gotten my machine to its knees. > The jar has an endless while loop. Thus please kill the PID when you are done

Re: [GENERAL] Timezone locale consistency for functional indexes

2017-06-12 Thread Adrian Klaver
On 06/12/2017 06:11 AM, Olav Gjerde wrote: Oops sent previous post before actual reply. I figured out the issue, it was as simple as some developers used the default in Java's Hibernate which created the timestamp columns without time zone. Anyway I guess this is the correct approach that

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Tom Lane
Achilleas Mantzios writes: > After 2 full attempts, (and after bringing my poor - old workstation to its > knees) it still does not produce the supposed ERROR : Yeah, I've had little luck reproducing it either. However, I noticed a few messages back that Harry is

Re: [GENERAL] Timezone locale consistency for functional indexes

2017-06-12 Thread Adrian Klaver
On 06/12/2017 06:11 AM, Olav Gjerde wrote: I figured out the issue, it was as simple as some developers used the default in Java's Hibernate which created the timestamp columns without time zone. Anyway I guess this is the correct approach that also take summer time into consideration? And

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Achilleas Mantzios
On 12/06/2017 10:46, Harry Ambrose wrote: Hi, > Their suggestion is to upload to Google Drive. That or use a third party site, like Dropbox. I have uploaded the jar to dropbox, link below (please let me know if you have any issues downloading):

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Harry Ambrose
It seems to be very hit and miss... The below is from the machine described in this thread running PostgreSQL 9.4.10: update 10 update 12 update 14 update 16 update 18 Update all Vacuum org.postgresql.util.PSQLException: ERROR: unexpected chunk number 2285 (expected 0)

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Tom Lane
Harry Ambrose writes: > - Custom tablespaces (where the errors occur) sat on 4 disk RAID-10 (ext3 > filesystem). BTW, how do you get that jar to make the test table on a non-default tablespace? Or are you just putting the whole test DB on a tablespace?

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Harry Ambrose
Hi, BTW, how do you get that jar to make the test table on a non-default > tablespace? Or are you just putting the whole test DB on a tablespace? > > regards, tom lane > I have been putting the whole database on a tablespace. It seemed easier than modifying the jar.

[GENERAL] ERROR: type " " does not exist

2017-06-12 Thread Alexander Farber
Good evening! Why does PostgreSQL 9.5.4 print the error: LOG: execute : SELECT out_uid AS uid, out_fcm AS fcm, out_apns AS apns, out_sns AS sns, out_note AS note FROM words_resign_game($1::int, $2::int) DETAIL: parameters: $1 = '2', $2 = '1' ERROR: type " " does not exist at character

[GENERAL] Create extension C using IDE

2017-06-12 Thread Fabiana Zioti
I already have postgresql 9.6 installed. I'm developing extensions for it in C. What would be the best IDE to debug the code? Eclipse has many errors.

Re: [GENERAL] Create extension C using IDE

2017-06-12 Thread Adrian Klaver
On 06/12/2017 11:03 AM, Fabiana Zioti wrote: I already have postgresql 9.6 installed. I'm developing extensions for it in C. What would be the best IDE to debug the code? Eclipse has many errors. The errors are? -- Adrian Klaver adrian.kla...@aklaver.com -- Sent via pgsql-general mailing

Re: [GENERAL] Create extension C using IDE

2017-06-12 Thread Alban Hertroys
> On 12 Jun 2017, at 20:09, Adrian Klaver wrote: > > On 06/12/2017 11:03 AM, Fabiana Zioti wrote: >> I already have postgresql 9.6 installed. I'm developing extensions for it in >> C. What would be the best IDE to debug the code? Eclipse has many errors. > > The

Re: [GENERAL] Strange port in pg_upgrade output

2017-06-12 Thread armand pirvu
Got it Thank you > On Jun 12, 2017, at 4:16 PM, Adrian Klaver wrote: > > On 06/12/2017 02:07 PM, armand pirvu wrote: >> Hi >> I was doing a test upgrade from 9.5 to 9.6 and the following lines caught my >> eye >> postgres 10967 10911 0 15:59 pts/000:00:00 >>

Re: [GENERAL] ERROR: type " " does not exist

2017-06-12 Thread Melvin Davidson
On Mon, Jun 12, 2017 at 4:28 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Mon, Jun 12, 2017 at 1:03 PM, Alexander Farber < > alexander.far...@gmail.com> wrote: > >> ERROR: type " " does not exist at character 149 >> > > ​Nothing shown would explain what you are seeing. Of

Re: [GENERAL] Strange port in pg_upgrade output

2017-06-12 Thread Adrian Klaver
On 06/12/2017 02:07 PM, armand pirvu wrote: Hi I was doing a test upgrade from 9.5 to 9.6 and the following lines caught my eye postgres 10967 10911 0 15:59 pts/000:00:00 /usr/pgsql-9.6/bin/pg_upgrade -d /var/lib/pgsql/9.5/data -D /var/lib/pgsql/9.6/data -b /usr/pgsql-9.5/bin -B

Re: [GENERAL] ERROR: type " " does not exist

2017-06-12 Thread David G. Johnston
On Mon, Jun 12, 2017 at 1:03 PM, Alexander Farber < alexander.far...@gmail.com> wrote: > ERROR: type " " does not exist at character 149 > ​Nothing shown would explain what you are seeing. Of course, white-space issues are really hard to communicate via email. As a brute-force suggestion I'd

Re: [GENERAL] ERROR: type " " does not exist

2017-06-12 Thread Tom Lane
Alexander Farber writes: > Why does PostgreSQL 9.5.4 print the error: > ERROR: type " " does not exist at character 149 Hmph. Works for me, after reverse-engineering some tables and sample data. Maybe your actual function text contains some non-breaking spaces, or

Re: [GENERAL] ERROR: type " " does not exist

2017-06-12 Thread Adrian Klaver
On 06/12/2017 01:03 PM, Alexander Farber wrote: Good evening! Why does PostgreSQL 9.5.4 print the error: LOG: execute : SELECT out_uid AS uid, out_fcm AS fcm, out_apns AS apns, out_sns AS sns, out_note AS note FROM words_resign_game($1::int, $2::int) DETAIL: parameters: $1 = '2',

[GENERAL] Strange port in pg_upgrade output

2017-06-12 Thread armand pirvu
Hi I was doing a test upgrade from 9.5 to 9.6 and the following lines caught my eye postgres 10967 10911 0 15:59 pts/000:00:00 /usr/pgsql-9.6/bin/pg_upgrade -d /var/lib/pgsql/9.5/data -D /var/lib/pgsql/9.6/data -b /usr/pgsql-9.5/bin -B /usr/pgsql-9.6/bin -k -v postgres 11141 1 0

[GENERAL] workaround for column cross-correlation

2017-06-12 Thread Justin Pryzby
I know PG 10 will have support "CREATE STATISTICS.." for this.. ..but I wondered if there's a recommended workaround in earlier versions ? We had two issues: 1) improper estimate caused poor plans (nested loops due to ::date, GROUP BY, cross-column stats, and maybe more). 2) memory explosion in

Re: [GENERAL] workaround for column cross-correlation

2017-06-12 Thread Jeff Janes
On Mon, Jun 12, 2017 at 8:17 PM, Justin Pryzby wrote: > I know PG 10 will have support "CREATE STATISTICS.." for this.. > > ..but I wondered if there's a recommended workaround in earlier versions ? > Not without seeing the query > > 2) memory explosion in hash join

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Achilleas Mantzios
On 09/06/2017 19:02, Harry Ambrose wrote: Hi, No error messages found. - is your RAM ECC? Did you run any memtest? Yes, memory is ECC. No error messages found. So I guess you run memtest86+ and it reported that your memory is indeed ECC and also that it is working properly? Best

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Adam Sjøgren
Alvaro Herrera wrote: > ADSJ (Adam Sjøgren) wrote: > >> Our database has started reporting errors like this: >> >> 2017-05-31 13:48:10 CEST ERROR: unexpected chunk number 0 (expected 1) >> for toast value 14242189 in pg_toast_10919630 > Does the problem still

Re: [GENERAL] ERROR: unexpected chunk number 0 (expected 1) for toast value 76753264 in pg_toast_10920100

2017-06-12 Thread Harry Ambrose
Hi, > Their suggestion is to upload to Google Drive. That or use a third party site, like Dropbox. I have uploaded the jar to dropbox, link below (please let me know if you have any issues downloading): https://www.dropbox.com/s/96vm465i7rwhcf8/toast-corrupter-aio.jar?dl=0 > So I guess you run

Re: [GENERAL] Huge Pages - setting the right value

2017-06-12 Thread pinker
standard hugepages, transparent are disabled. They were set exactly following the procedure from postgres documentation. -- View this message in context: http://www.postgresql-archive.org/Huge-Pages-setting-the-right-value-tp5952972p5966064.html Sent from the PostgreSQL - general mailing list

Re: [GENERAL] JSON to INT[] or other custom type

2017-06-12 Thread Rory Campbell-Lange
On 11/06/17, Bruno Wolff III (br...@wolff.to) wrote: > On Sun, Jun 11, 2017 at 22:35:14 +0100, > Rory Campbell-Lange wrote: > > > >I'm hoping, in the plpgsql function, to unfurl the supplied json into a > >custom type or at least an array of ints, and I can't work out

Re: [GENERAL] workaround for column cross-correlation

2017-06-12 Thread Justin Pryzby
On Mon, Jun 12, 2017 at 08:46:57PM -0700, Jeff Janes wrote: > On Mon, Jun 12, 2017 at 8:17 PM, Justin Pryzby wrote: > > > I know PG 10 will have support "CREATE STATISTICS.." for this.. > > > > ..but I wondered if there's a recommended workaround in earlier versions ? > >

Re: [GENERAL] Performance issue with Pointcloud extension

2017-06-12 Thread Eric Lemoine
> Another idea, if you haven't tried it already, is to run these test cases > in a server built with --enable-debug and --enable-cassert. The memory > clobber stuff that's enabled by the latter is very good at turning coding > errors into reproducible, debuggable crashes ;-) > >