Re: [HACKERS] Proposing pg_hibernate

2014-06-07 Thread Cédric Villemain
Le lundi 3 février 2014 19:18:54 Gurjeet Singh a écrit : > Possible enhancements: > - Ability to save/restore only specific databases. > - Control how many BlockReaders are active at a time; to avoid I/O > storms. - Be smart about lowered shared_buffers across the restart. > - Different modes of re

[HACKERS] Using Index-only scans to speed up count(*)

2014-06-07 Thread Gurjeet Singh
While reading [1] in context of Postgres Hibernator, I see that Mitsuru mentioned one of the ways other RDBMS allows count(*) to be driven by an index. > 'select /*+ INDEX(emp emp_pk) */ count(*) from emp;' to load index blocks I am not sure if Postgres planner already allows this, but it would b

Re: [HACKERS] Using Index-only scans to speed up count(*)

2014-06-07 Thread Cédric Villemain
Le samedi 7 juin 2014 08:35:27 Gurjeet Singh a écrit : > While reading [1] in context of Postgres Hibernator, I see that > Mitsuru mentioned one of the ways other RDBMS allows count(*) to be > driven by an index. > > > 'select /*+ INDEX(emp emp_pk) */ count(*) from emp;' to load index > > blocks >

Re: [HACKERS] Using Index-only scans to speed up count(*)

2014-06-07 Thread Gurjeet Singh
On Sat, Jun 7, 2014 at 8:56 AM, Cédric Villemain wrote: > Le samedi 7 juin 2014 08:35:27 Gurjeet Singh a écrit : > >> PS: Please note that I am not proposing to add support for the >> optimizer hint embedded in Mitsuru's query. > > :-) Even though I (sometimes) favor hints, and developed the opti

Re: [HACKERS] Using Index-only scans to speed up count(*)

2014-06-07 Thread Cédric Villemain
Le samedi 7 juin 2014 09:09:00 Gurjeet Singh a écrit : > On Sat, Jun 7, 2014 at 8:56 AM, Cédric Villemain wrote: > > Le samedi 7 juin 2014 08:35:27 Gurjeet Singh a écrit : > >> PS: Please note that I am not proposing to add support for the > >> optimizer hint embedded in Mitsuru's query. > >> >

Re: [HACKERS] Using Index-only scans to speed up count(*)

2014-06-07 Thread Noah Misch
On Sat, Jun 07, 2014 at 08:35:27AM -0400, Gurjeet Singh wrote: > While reading [1] in context of Postgres Hibernator, I see that > Mitsuru mentioned one of the ways other RDBMS allows count(*) to be > driven by an index. > > > 'select /*+ INDEX(emp emp_pk) */ count(*) from emp;' to load index bloc

Re: [HACKERS] PG Manual: Clarifying the repeatable read isolation example

2014-06-07 Thread Kevin Grittner
David G Johnston wrote: >>>   "For example, even a read only transaction at this level may see a >>> control record updated to show that a batch has been completed but >>> not see one of the detail records which is logically part of the >>> batch because it read an earlier revision of the control

Re: [HACKERS] PG Manual: Clarifying the repeatable read isolation example

2014-06-07 Thread Gavin Flower
On 08/06/14 05:03, Kevin Grittner wrote: [...] I found it hard to decide how far to go in the docs versus the Wiki page. Any suggestions or suggested patches welcome. [...] I know this is subjective, but that seems to me a little too much in an academic style for the docs. In the Wiki page ex

Re: [HACKERS] Providing catalog view to pg_hba.conf file - Patch submission

2014-06-07 Thread Jaime Casanova
On Fri, Mar 14, 2014 at 12:30 AM, Prabakaran, Vaishnavi wrote: > Hi, > > In connection to my previous proposal about "providing catalog view to > pg_hba.conf file contents" , I have developed the attached patch . > [...] > > [What this Patch does] > > Functionality of the attached patch is that it

Re: [HACKERS] Suppressing unused subquery output columns

2014-06-07 Thread David Rowley
On Fri, Jun 6, 2014 at 2:27 PM, Tom Lane wrote: > I'm not entirely convinced that it's worth the extra planning cycles, > though. Given the small number of complaints to date, it might not > be worth doing this. Thoughts? > > That's a difficult question for sure. Obviously it's going to depend

Re: [HACKERS] avoiding tuple copying in btree index builds

2014-06-07 Thread Amit Kapila
On Wed, Jun 4, 2014 at 2:08 AM, Robert Haas wrote: > On Sun, Jun 1, 2014 at 3:26 AM, Amit Kapila wrote: > > I also think it's possible to have similar optimization for hash index > > incase it has to spool the tuple for sorting. > > > > In function hashbuildCallback(), when buildstate->spool is

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2014-06-07 Thread Amit Kapila
On Fri, Jun 6, 2014 at 2:11 PM, Naoya Anzai wrote: > > Hi All, > > When log_duration is true ( or log_min_duration_statement>=0 ), > If a transaction has internally been commited receives a SIGINT signal > then a query cancellation error is output. > > For example, > 1. A query like a TRUNCATE is