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 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 and > th

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 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, BTREE_METAPAGE, .. > i.e.

[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 kind

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 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 reac

[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 http://fetter.org/ Phone: +

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

2015-03-26 Thread Jerry Sievers
Jerry Sievers 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 pg_dump complains

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

2015-03-26 Thread Andrew Gierth
> "Svenne" == Svenne Krap 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 interest

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 -- Se

[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 c

[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 in

[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

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 Nasby 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 adding it to pg_confi

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 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 assignment that

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 happe

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 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 that this i

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 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 just grouping those 3 t

Re: [HACKERS] pg_rewind in contrib

2015-03-26 Thread Arthur Silva
On Mar 26, 2015 4:20 AM, "Vladimir Borodin" wrote: > > >> 26 марта 2015 г., в 7:32, Michael Paquier написал(а): >> >> On Thu, Mar 26, 2015 at 12:23 PM, Venkata Balaji N wrote: >>> >>> Test 1 : >>> >>> [...] >>> >>> If the master is crashed or killed abruptly, it may not be possible to do a >>> r

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 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 constraints - no reaso

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

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 th

[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] compiler warnings in lwlock

2015-03-26 Thread Tom Lane
Jeff Janes 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 (pgsql-hackers@postgresq

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 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 reac

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

2015-03-26 Thread Tom Lane
Andres Freund 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 than before?

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

2015-03-26 Thread Tom Lane
Andres Freund 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 would be the time t

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

Re: [HACKERS] Error with index on unlogged table

2015-03-26 Thread Thom Brown
On 26 March 2015 at 00:55, Michael Paquier wrote: > On Thu, Mar 26, 2015 at 1:02 AM, Fabrízio de Royes Mello > wrote: > > On Wed, Mar 25, 2015 at 12:46 PM, Fabrízio de Royes Mello > > wrote: > >> > >> > >> On Wed, Mar 25, 2015 at 10:53 AM, Andres Freund > > >> wrote: > >> > > >> > >> > Did you

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

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 pager_min

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 writes: I often get annoyed because psql is a bit too aggressive when it decides whether to put

[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 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 Oskari or I

Re: [HACKERS] pg_rewind in contrib

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