Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2014-08-04 Thread Dilip kumar
On 31 July 2014 10:59, Amit kapila Wrote, Thanks for the review and valuable comments. I have fixed all the comments and attached the revised patch. As per your suggestion I have taken the performance report also… Test1: Machine Configuration: Core : 8

Re: [HACKERS] Use unique index for longer pathkeys.

2014-08-04 Thread Kyotaro HORIGUCHI
Hello, Now drop the i_t1_pkey_1 and check the query plan again. drop index i_t1_pkey_1; explain (costs off, analyze off) select * from t,t1 where t.a=t1.a order by t1.a,t1.b,t1.c,t1.d; QUERY PLAN Sort

Re: [HACKERS] Proposal: Incremental Backup

2014-08-04 Thread Gabriele Bartolini
Hi guys, sorry if I jump in the middle of the conversation. I have been reading with much interest all that's been said above. However, the goal of this patch is to give users another possibility while performing backups. Especially when large databases are in use. I really like the

Re: [HACKERS] Is analyze_new_cluster.sh still useful?

2014-08-04 Thread Christoph Berg
Re: Bruce Momjian 2014-07-29 20140729094234.gc13...@momjian.us On Fri, Jun 20, 2014 at 05:15:05PM +0200, Christoph Berg wrote: Another nitpick here: What pg_upgrade outputs doesn't even work on most systems, you need to ./analyze_new_cluster.sh or sh analyze_new_cluster.sh. Well, the

Re: [HACKERS] Looked at TODO:Considering improving performance of computing CHAR() value lengths

2014-08-04 Thread Heikki Linnakangas
On 08/02/2014 09:43 PM, John Cochran wrote: I took at look at the TODO list and got interested in the possible optimization of the bcTruelen() function. Read the archived messages about that subject and decided to see what could be done. I tested the performance of 5 different versions of

Re: [HACKERS] add modulo (%) operator to pgbench

2014-08-04 Thread Fabien COELHO
This patch is pretty trivial. Another slightly less trivial but more useful version. The issue is that there are 3 definitions of modulo, two of which are fine (Knuth floored division and Euclidian), and the last one much less useful. Alas, C (%) SQL (MOD) choose the bad definition:-( I

[HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Seref Arikan
Greetings, I hope this is the right group to ask this question; apologies if this should go the general or some other list. I have multiple shared libraries that can be called from C that I'd like to use from a C based postgresql function. These libraries perform some expensive initialization

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Albe Laurenz
Seref Arikan wrote: I hope this is the right group to ask this question; apologies if this should go the general or some other list. I have multiple shared libraries that can be called from C that I'd like to use from a C based postgresql function. These libraries perform some

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Heikki Linnakangas
On 08/04/2014 12:54 PM, Seref Arikan wrote: Greetings, I hope this is the right group to ask this question; apologies if this should go the general or some other list. I have multiple shared libraries that can be called from C that I'd like to use from a C based postgresql function. These

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Seref Arikan
Thanks a lot Heikki and Albe. Exactly what I was asking for. Heikki: the libraries are written in languages that have their own runtime and their documentation insists that both init and dispose calls are performed when used from C. PG_init() and proc_exit sounds spot on. Any ideas about keeping

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-04 Thread Shigeru Hanada
Hi Fujita-san, Here is a new review result from Eitoku-san. 2014-07-25 16:30 GMT+09:00 Etsuro Fujita fujita.ets...@lab.ntt.co.jp: (2014/07/24 18:30), Shigeru Hanada wrote: I'm not sure that I understand your question correctly, but the reason for that is because foreign tables cannot have

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Heikki Linnakangas
On 08/04/2014 01:31 PM, Seref Arikan wrote: Thanks a lot Heikki and Albe. Exactly what I was asking for. Heikki: the libraries are written in languages that have their own runtime and their documentation insists that both init and dispose calls are performed when used from C. PG_init() and

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-04 Thread Etsuro Fujita
(2014/07/30 17:22), Etsuro Fujita wrote: (2014/07/29 0:58), Robert Haas wrote: On Fri, Jul 25, 2014 at 3:39 AM, Albe Laurenz laurenz.a...@wien.gv.at wrote: Shigeru Hanada wrote: * Naming of new behavior You named this optimization Direct Update, but I'm not sure that this is intuitive enough

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2014-08-04 Thread Etsuro Fujita
Hi Hanada-san, Thank you for the answer. (2014/08/04 19:36), Shigeru Hanada wrote: 2014-07-25 16:30 GMT+09:00 Etsuro Fujita fujita.ets...@lab.ntt.co.jp: (2014/07/24 18:30), Shigeru Hanada wrote: I'm not sure that I understand your question correctly, but the reason for that is because foreign

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Craig Ringer
On 08/04/2014 06:31 PM, Seref Arikan wrote: Thanks a lot Heikki and Albe. Exactly what I was asking for. Heikki: the libraries are written in languages that have their own runtime and their documentation insists that both init and dispose calls are performed when used from C. PG_init() and

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Seref Arikan
Hi, On Mon, Aug 4, 2014 at 11:58 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 08/04/2014 01:31 PM, Seref Arikan wrote: Thanks a lot Heikki and Albe. Exactly what I was asking for. Heikki: the libraries are written in languages that have their own runtime and their

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Albe Laurenz
Craig Ringer wrote: On 08/04/2014 06:31 PM, Seref Arikan wrote: Thanks a lot Heikki and Albe. Exactly what I was asking for. Heikki: the libraries are written in languages that have their own runtime and their documentation insists that both init and dispose calls are performed when used from

Re: [HACKERS] How to manage shared library lifetime through C functions

2014-08-04 Thread Craig Ringer
On 08/04/2014 09:48 PM, Albe Laurenz wrote: There are valid use cases (else the function probably wouldn't exist). I use it in oracle_fdw to gracefully close any open Oracle connections when the process exits. True; it's sometimes better to do a clean exit. It's relying on that always

[HACKERS] SSL regression test suite

2014-08-04 Thread Heikki Linnakangas
While working on the SSL refactoring patch, it struck me that we don't have any regression tests for SSL support. A suite to test all the different sslmodes etc. is essential before we can start implementing alternatives to OpenSSL. Now that we use TAP for testing client tools, I think we can

Re: [HACKERS] postgresql.auto.conf and reload

2014-08-04 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes: The patch chooses the last settings for every parameters and ignores the former settings. But I don't think that every parameters need to be processed this way. That is, we can change the patch so that only PGC_POSTMASTER parameters are processed that

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-04 Thread Robert Haas
On Thu, Jul 31, 2014 at 9:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Baker, Keith [OCDUS Non-JJ] kbak...@its.jnj.com writes: Since ensuring there are not orphaned back-end processes is vital, could we add a check for getppid() == 1 ? No. Or yeah, we could, but that patch would add no

Re: [HACKERS] postgresql.auto.conf and reload

2014-08-04 Thread Fujii Masao
On Tue, Jul 29, 2014 at 3:33 AM, Josh Berkus j...@agliodbs.com wrote: On 07/28/2014 11:03 AM, Fujii Masao wrote: On Sat, Jul 26, 2014 at 1:07 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Fri, Jul 25, 2014 at 6:11 PM, Fujii Masao masao.fu...@gmail.com wrote: On Wed, Jul 9, 2014 at 11:05

[HACKERS] missing PG_RETURN_UINT16

2014-08-04 Thread Manuel Kniep
Hi, I’m missing the PG_RETURN_UINT16 macro in fmgr.h Since we already have the PG_GETARG_UINT16 macro I guess it makes sense to to have it. here is the trivial patch for it. add_pg_return_uint16_macro.patch Description: Binary data cheers Manuel -- Sent via pgsql-hackers mailing list

[HACKERS] pg_upgrade autovacuum_multixact_freeze_max_age fix

2014-08-04 Thread Bruce Momjian
I have applied the attached patch to remove a reference to autovacuum_multixact_freeze_max_age. autovacuum_multixact_freeze_max_age was added as a pg_ctl start parameter in 9.3.X to prevent autovacuum from running. However, only some 9.3.X releases have autovacuum_multixact_freeze_max_age as it

Re: [HACKERS] SKIP LOCKED DATA (work in progress)

2014-08-04 Thread Alvaro Herrera
David Rowley wrote: The only notes I can think to leave for the commiter would be around the precedence order of the lock policy, especially around a query such as: SELECT * FROM (SELECT * FROM a FOR UPDATE SKIP LOCKED) a FOR UPDATE; -- skip locked wins Of course the current behaviour is

Re: [HACKERS] Proposal: Incremental Backup

2014-08-04 Thread Claudio Freire
On Mon, Aug 4, 2014 at 5:15 AM, Gabriele Bartolini gabriele.bartol...@2ndquadrant.it wrote: I really like the proposal of working on a block level incremental backup feature and the idea of considering LSN. However, I'd suggest to see block level as a second step and a goal to keep in mind

Re: [HACKERS] KNN-GiST with recheck

2014-08-04 Thread Alexander Korotkov
On Sun, Aug 3, 2014 at 5:48 PM, Emre Hasegeli e...@hasegeli.com wrote: 1. This patch introduces a new polygon - point operator. That seems useful on its own, with or without this patch. Yeah, but exact-knn cant come with no one implementation. But it would better come in a separate

Re: [HACKERS] pg_ctl non-idempotent behavior change

2014-08-04 Thread Alvaro Herrera
Tom Lane wrote: Jeff Janes jeff.ja...@gmail.com writes: After 87306184580c9c49717, if the postmaster dies without cleaning up (i.e. power outage), running pg_ctl start just gives this message and then exits: pg_ctl: another server might be running Under the old behavior, it would

Re: [HACKERS] Proposal to add a QNX 6.5 port to PostgreSQL

2014-08-04 Thread Josh Berkus
On 08/04/2014 07:54 AM, Robert Haas wrote: 1. Most seriously, once the postmaster is gone, there's nobody to SIGQUIT remaining backends if somebody exits uncleanly. This means that a backend running without a postmaster could be running in a corrupt shared memory segment, which could lead to

Re: [HACKERS] wrapping in extended mode doesn't work well with default pager

2014-08-04 Thread Noah Misch
This remains open for 9.4. Your proposal to revert the feature in 9.4 and fix it in 9.5 sounds reasonable. On Thu, Jul 10, 2014 at 04:15:35PM +0100, Greg Stark wrote: On Mon, Jul 7, 2014 at 8:35 AM, Sergey Muraviov sergey.k.murav...@gmail.com wrote: So what's wrong with the patch? And what

Re: [HACKERS] 9.5: Better memory accounting, towards memory-bounded HashAgg

2014-08-04 Thread Peter Geoghegan
On Sat, Aug 2, 2014 at 1:40 PM, Jeff Davis pg...@j-davis.com wrote: This is a prerequisite for memory-bounded HashAgg, which I intend to submit for the next CF. FWIW, I think that's a good project. A large number of these TPC-H queries used HashAggs when I checked, on a moderate sized sample

Re: [HACKERS] postgresql.auto.conf and reload

2014-08-04 Thread Fujii Masao
On Mon, Aug 4, 2014 at 11:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Fujii Masao masao.fu...@gmail.com writes: The patch chooses the last settings for every parameters and ignores the former settings. But I don't think that every parameters need to be processed this way. That is, we can change

Re: [HACKERS] Use unique index for longer pathkeys.

2014-08-04 Thread Amit Kapila
On Mon, Aug 4, 2014 at 1:22 PM, Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp wrote: Hello, I think irrespective of that we can trim t1.c t1.d as we have primary key (unique and non column) for t1.a, t1.b. Basically even if we don't use the primary key index, we can still trim

[HACKERS] PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?

2014-08-04 Thread testman1316
We am trying to get an idea of the raw performance of Oracle vs PostgreSQL. We have extensive oracle experience but are new to PostgreSQL. We are going to run lots of queries with our data, etc. But first we wanted to see just how they perform on basic kernel tasks, i.e. math and branching since

Re: [HACKERS] PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?

2014-08-04 Thread Mark Kirkwood
On 05/08/14 08:48, testman1316 wrote: We am trying to get an idea of the raw performance of Oracle vs PostgreSQL. We have extensive oracle experience but are new to PostgreSQL. We are going to run lots of queries with our data, etc. But first we wanted to see just how they perform on basic