[HACKERS] Re: [COMMITTERS] pgsql: Add macros wrapping all usage of gcc's __attribute__.

2015-03-26 Thread Andres Freund
On 2015-03-25 19:11:06 -0400, Tom Lane wrote: Andres Freund and...@anarazel.de writes: Add macros wrapping all usage of gcc's __attribute__. I noticed that this commit attached pg_attribute_noreturn not only to the extern declarations, but to some actual function definitions. Unless either

Re: [HACKERS] controlling psql's use of the pager a bit more

2015-03-26 Thread Andrew Dunstan
On 12/21/2014 02:22 PM, Andrew Dunstan wrote: On 11/15/2014 05:56 PM, Andrew Dunstan wrote: On 11/13/2014 11:41 AM, Andrew Dunstan wrote: On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I often get annoyed because psql is a bit too aggressive when it

Re: [HACKERS] Error with index on unlogged table

2015-03-26 Thread Kyotaro HORIGUCHI
Hello, At Thu, 26 Mar 2015 18:50:24 +0100, Andres Freund and...@2ndquadrant.com wrote in 20150326175024.gj...@alap3.anarazel.de I think the problem here is that the *primary* makes no such assumptions. Init forks are logged via stuff like smgrwrite(index-rd_smgr, INIT_FORKNUM,

Re: [HACKERS] trying to study how sorting works

2015-03-26 Thread Ashutosh Bapat
On Thu, Mar 26, 2015 at 10:44 PM, hitesh ramani hiteshram...@hotmail.com wrote: Hello devs, I'm trying to understand how sorting exactly works in Postgres, I've understood that there are two sorting mechanisms depending on the size of the data, one being qsort which is initiated if workmem

[HACKERS] trying to study how sorting works

2015-03-26 Thread hitesh ramani
Hello devs, I'm trying to understand how sorting exactly works in Postgres, I've understood that there are two sorting mechanisms depending on the size of the data, one being qsort which is initiated if workmem is 1024 kb and the other being external sort which is initiated in the other case.

Re: [HACKERS] Error with index on unlogged table

2015-03-26 Thread Andres Freund
On 2015-03-26 15:13:41 +0100, Andres Freund wrote: On 2015-03-26 13:55:22 +, Thom Brown wrote: I still, however, have a problem with the separate and original issue of: # insert into utest (thing) values ('moomoo'); ERROR: index utest_pkey contains unexpected zero page at block 0

Re: [HACKERS] Index-only scans for GiST.

2015-03-26 Thread Heikki Linnakangas
On 03/02/2015 12:43 AM, Heikki Linnakangas wrote: On 02/27/2015 04:19 PM, Anastasia Lubennikova wrote: I add MemoryContext listCxt to avoid memory leak. listCxt is created once in gistrescan (only for index-only scan plan ) and reseted when scan of the leaf page is finished. I do not sure if

Re: [HACKERS] pg_rewind in contrib

2015-03-26 Thread Arthur Silva
On Mar 26, 2015 4:20 AM, Vladimir Borodin r...@simply.name wrote: 26 марта 2015 г., в 7:32, Michael Paquier michael.paqu...@gmail.com написал(а): On Thu, Mar 26, 2015 at 12:23 PM, Venkata Balaji N nag1...@gmail.com wrote: Test 1 : [...] If the master is crashed or killed abruptly, it

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-03-26 Thread Gavin Flower
On 27/03/15 09:14, Peter Geoghegan wrote: On Thu, Mar 26, 2015 at 2:51 PM, Heikki Linnakangas hlinn...@iki.fi wrote: [...] Oops - You're right. I find it interesting that this didn't result in breaking my test cases. [...] Reminds of the situation where I got an A++ for a COBOL programming

Re: [HACKERS] Exposing PG_VERSION_NUM in pg_config

2015-03-26 Thread Jim Nasby
On 3/25/15 2:00 PM, Andres Freund wrote: On 2015-03-25 14:50:44 -0400, Tom Lane wrote: Jim Nasbyjim.na...@bluetreble.com writes: On 3/24/15 6:26 PM, Tom Lane wrote: Hm. We're all agreed that there's a use case for exposing PG_VERSION_NUM to the makefiles, but I did not hear one for

Re: [HACKERS] trying to study how sorting works

2015-03-26 Thread Jim Nasby
On 3/26/15 12:14 PM, hitesh ramani wrote: Hello devs, I'm trying to understand how sorting exactly works in Postgres, I've understood that there are two sorting mechanisms depending on the size of the data, one being qsort which is initiated if workmem is 1024 kb That's incorrect. What

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-03-26 Thread Heikki Linnakangas
On 03/26/2015 08:00 PM, Peter Geoghegan wrote: On Wed, Mar 25, 2015 at 12:42 PM, Peter Geoghegan p...@heroku.com wrote: My next revision will have a more polished version of this scheme. I'm not going to immediately act on Robert's feedback elsewhere (although I'd like to), owing to time

Re: [HACKERS] controlling psql's use of the pager a bit more

2015-03-26 Thread Andres Freund
On 2014-12-21 14:22:10 -0500, Andrew Dunstan wrote: @@ -301,11 +301,11 @@ slashUsage(unsigned short int pager) * show list of available variables (options) from command line */ void -helpVariables(unsigned short int pager) +helpVariables(unsigned short int pager, int

Re: [HACKERS] GSSAPI, SSPI - include_realm default

2015-03-26 Thread Stephen Frost
Bruce, * Bruce Momjian (br...@momjian.us) wrote: On Tue, Dec 9, 2014 at 05:38:25PM -0500, Stephen Frost wrote: My comment that include_realm is supported back to 8.4 was because there is an expectation that a pg_hba.conf file can be used unchanged across several major releases. So

Re: [HACKERS] Error with index on unlogged table

2015-03-26 Thread Thom Brown
On 26 March 2015 at 00:55, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Mar 26, 2015 at 1:02 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Wed, Mar 25, 2015 at 12:46 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Wed, Mar 25, 2015 at 10:53

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add macros wrapping all usage of gcc's __attribute__.

2015-03-26 Thread Andres Freund
On 2015-03-26 11:27:32 -0400, Tom Lane wrote: Being the one complaining, I'll go do the legwork to clean this up. Looks good, Thanks! Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training Services --

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-26 Thread Jim Nasby
On 3/25/15 8:35 PM, Jeff Janes wrote: On Wed, Mar 25, 2015 at 12:45 PM, Jim Nasby jim.na...@bluetreble.com mailto:jim.na...@bluetreble.com wrote: I see 3 settings that allow people to accidentally shoot themselves in the foot; fsync, wal_sync_method and full_page_writes. How about

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-03-26 Thread Peter Geoghegan
On Thu, Mar 26, 2015 at 2:51 PM, Heikki Linnakangas hlinn...@iki.fi wrote: Attached revision, V3.1, implements this slightly different way of figuring out if an insertion is speculative, as discussed. We reuse t_ctid for speculatively inserted tuples. That's where the counter goes. I think

[HACKERS] Changing ownership of simple composite incomplete?

2015-03-26 Thread Jerry Sievers
Hackers; I spotted this after doing some owner reassignments and then dropping the old roles. It looks like using either reassign or alter type owner to, the pg_class entry stays with old rolID. Then if we drop that old role going forward pg_dump complains about invalid owner. See below test

[HACKERS] Index-only scans with btree_gist

2015-03-26 Thread Heikki Linnakangas
I've pushed Anastasia's patch to support index-only scans with GiST, and it's time to add opclasses support for all the opclasses that are not lossy. I think at least all the btree_gist opclasses need to be supported, it would be pretty surprising if they didn't support index-only scans, while

[HACKERS] GSoC 2015 proposal: Support for microvacuum for GiST

2015-03-26 Thread Ilia Ivanicki
Hi, hackers! I want to show my proposal idea for GSoC 2015. I'm newbie to coding for PostgreSQL. http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/ivanitskiy_ilya/5629499534213120 *** *Abstract:* Currently support for microvacuum is implemented only for BTree index. But GiST

Re: [HACKERS] controlling psql's use of the pager a bit more

2015-03-26 Thread Andrew Dunstan
On 03/26/2015 11:10 AM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Without having actually tried it, it looks clean enough to me. If there's more pager options we might at some point introduce a pager options struct instead adding more options to PageOutput. But for now it

[HACKERS] WIP: Split of hash index bucket

2015-03-26 Thread Antonin Houska
I've read proposal [1] and also major part of thread [2]. [1] encouraged me to try an alternative approach, which does not require flags at tuple level. After thinking about it for some time, I decided to code something - see attachment of this mail. (I was not sure whether I should write some

[HACKERS] Bug fix for missing years in make_date()

2015-03-26 Thread David Fetter
Folks, For reasons unclear, dates before the Common Era are disallowed in make_date(), even though about 2/3 of the underlying data type's range up until the present time fits that description. Please find attached a patch fixing same. Cheers, David. -- David Fetter da...@fetter.org

Re: [HACKERS] Changing ownership of simple composite incomplete?

2015-03-26 Thread Jerry Sievers
Jerry Sievers gsiever...@comcast.net writes: Hackers; I spotted this after doing some owner reassignments and then dropping the old roles. It looks like using either reassign or alter type owner to, the pg_class entry stays with old rolID. Then if we drop that old role going forward

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2015-03-26 Thread Andrew Gierth
Svenne == Svenne Krap sve...@krap.dk writes: Svenne I still need to check against the standard and I will run it Svenne against a non-trivival production load... hopefully I will Svenne finish up my review shortly after the weekend... Thanks for the review so far; any progress? I'm quite

Re: [HACKERS] pg_rewind in contrib

2015-03-26 Thread Vladimir Borodin
26 марта 2015 г., в 7:32, Michael Paquier michael.paqu...@gmail.com написал(а): On Thu, Mar 26, 2015 at 12:23 PM, Venkata Balaji N nag1...@gmail.com wrote: Test 1 : [...] If the master is crashed or killed abruptly, it may not be possible to do a rewind. Is my understanding correct

Re: [HACKERS] controlling psql's use of the pager a bit more

2015-03-26 Thread Andrew Dunstan
On 03/26/2015 11:10 AM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Without having actually tried it, it looks clean enough to me. If there's more pager options we might at some point introduce a pager options struct instead adding more options to PageOutput. But for now it

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add macros wrapping all usage of gcc's __attribute__.

2015-03-26 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-03-25 19:11:06 -0400, Tom Lane wrote: I think this is a bad idea, because it's going to look like heck after pgindent gets through with it. Do we actually need decoration on the function definitions? Hm, I guess it should not look any worse

Re: [HACKERS] controlling psql's use of the pager a bit more

2015-03-26 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: Without having actually tried it, it looks clean enough to me. If there's more pager options we might at some point introduce a pager options struct instead adding more options to PageOutput. But for now it seems ok enough. My reaction is that now

Re: [HACKERS] compiler warnings in lwlock

2015-03-26 Thread Tom Lane
Jeff Janes jeff.ja...@gmail.com writes: When building with LOCK_DEBUG but without casserts, I was getting unused variable warnings. I believe this is the correct way to silence them. Committed, thanks. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Error with index on unlogged table

2015-03-26 Thread Andres Freund
On 2015-03-26 13:55:22 +, Thom Brown wrote: I still, however, have a problem with the separate and original issue of: # insert into utest (thing) values ('moomoo'); ERROR: index utest_pkey contains unexpected zero page at block 0 HINT: Please REINDEX it. I don't see why the user