Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-06-04 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-05-09 22:14:25 +0900, Michael Paquier wrote: [ patch ] I've committed a revised version of Andres' patch. Mostly cosmetic fixes, but the hash implementation was still wrong: return DirectFunctionCall1(hashint8, PG_GETARG_LSN(0));

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-06-04 Thread Michael Paquier
On Thu, Jun 5, 2014 at 9:54 AM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-05-09 22:14:25 +0900, Michael Paquier wrote: [ patch ] I've committed a revised version of Andres' patch. Thanks! I thought even that was kind of overkill; but a bigger

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Fabrízio de Royes Mello
On Sat, May 10, 2014 at 2:43 AM, Michael Paquier michael.paqu...@gmail.comwrote: On Fri, May 9, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: On Fri, May 9, 2014 at 10:03 PM, Andres Freund and...@2ndquadrant.com wrote: You plan to commit it? Yes unless many people object

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Fujii Masao
On Sat, May 10, 2014 at 9:51 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Fri, May 9, 2014 at 9:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Fri, May 9, 2014 at 8:42 PM, Tom Lane t...@sss.pgh.pa.us

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Andres Freund
On 2014-05-11 06:02:23 +0900, Fujii Masao wrote: On Sat, May 10, 2014 at 9:51 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Fri, May 9, 2014 at 9:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: [ shrug... ] proactive would have been doing this a month ago. If we're going to

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: I don't even understand why it's questionable whether this should be fixed. Sigh. We have some debate isomorphic to this one every year, it seems like. The argument why it shouldn't be fixed now is: ITS. TOO. LATE. Which part of that isn't clear to

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Fabrízio de Royes Mello
On Sat, May 10, 2014 at 6:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: I don't even understand why it's questionable whether this should be fixed. Sigh. We have some debate isomorphic to this one every year, it seems like. The argument why it

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Andres Freund
On 2014-05-10 19:19:22 -0300, Fabrízio de Royes Mello wrote: On Sat, May 10, 2014 at 6:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: I don't even understand why it's questionable whether this should be fixed. Sigh. We have some debate

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Magnus Hagander
On Sun, May 11, 2014 at 12:27 AM, Andres Freund and...@2ndquadrant.comwrote: On 2014-05-10 19:19:22 -0300, Fabrízio de Royes Mello wrote: On Sat, May 10, 2014 at 6:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: I don't even understand why it's

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-05-10 19:19:22 -0300, Fabrízio de Royes Mello wrote: Sorry but I don't understand why it's too late. The 9.4 branch not been created yet. The problem is that once the beta is in progress (starting tomorrow), the projects tries to avoid

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Fabrízio de Royes Mello
On Sat, May 10, 2014 at 7:27 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-10 19:19:22 -0300, Fabrízio de Royes Mello wrote: On Sat, May 10, 2014 at 6:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund and...@2ndquadrant.com writes: I don't even understand why it's

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Andres Freund
On 2014-05-11 00:31:09 +0200, Magnus Hagander wrote: On Sun, May 11, 2014 at 12:27 AM, Andres Freund and...@2ndquadrant.comwrote: On 2014-05-10 19:19:22 -0300, Fabrízio de Royes Mello wrote: On Sat, May 10, 2014 at 6:52 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andres Freund

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Michael Paquier
On Sun, May 11, 2014 at 7:39 AM, Andres Freund and...@2ndquadrant.com wrote: (makes me really wish betas were properly tagged with git as well...) They are tags for betas, here is for example the update of CATVERSION for 9.3: $ git log -p REL9_3_BETA1..REL9_3_0 src/include/catalog/catversion.h |

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Sun, May 11, 2014 at 12:27 AM, Andres Freund and...@2ndquadrant.comwrote: The problem is that once the beta is in progress (starting tomorrow), the projects tries to avoid changes which require a dump and restore (or pg_upgrade). Since the patch

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Andres Freund
On 2014-05-10 19:08:48 -0400, Tom Lane wrote: Magnus Hagander mag...@hagander.net writes: On Sun, May 11, 2014 at 12:27 AM, Andres Freund and...@2ndquadrant.comwrote: The problem is that once the beta is in progress (starting tomorrow), the projects tries to avoid changes which require a

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Michael Paquier
On Sat, May 10, 2014 at 9:45 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: Last night I sent a patch [1] to add more tests and change the operator name. Maybe we can merge the test cases... ;-) Sure, I noticed that. But I think that they are more complicated than necessary. I am as

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-10 Thread Michael Paquier
On Sun, May 11, 2014 at 8:17 AM, Andres Freund and...@2ndquadrant.com wrote: Anyway. I accept it's too late for beta1 now. Let's commit it if there's another catversion bump. +1. Let's rely on the experience of senior committers here. -- Michael -- Sent via pgsql-hackers mailing list

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Fujii Masao
On Wed, May 7, 2014 at 11:55 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, May 6, 2014 at 8:25 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, May 7, 2014 at 8:22 AM, Andres Freund and...@2ndquadrant.com wrote: Uh. They're different: Datum

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Andres Freund
On 2014-05-09 22:01:07 +0900, Fujii Masao wrote: On Wed, May 7, 2014 at 11:55 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, May 6, 2014 at 8:25 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, May 7, 2014 at 8:22 AM, Andres Freund and...@2ndquadrant.com

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Michael Paquier
On Fri, May 9, 2014 at 10:01 PM, Fujii Masao masao.fu...@gmail.com wrote: +DATA(insert OID = 3260 (403pglsn_opsPGNSP PGUID )); +DATA(insert OID = 3261 (405pglsn_opsPGNSP PGUID )); The patch looks good to me except the name of index operator class. I

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Andres Freund
On 2014-05-09 22:14:25 +0900, Michael Paquier wrote: On Fri, May 9, 2014 at 10:01 PM, Fujii Masao masao.fu...@gmail.com wrote: +DATA(insert OID = 3260 (403pglsn_opsPGNSP PGUID )); +DATA(insert OID = 3261 (405pglsn_opsPGNSP PGUID )); The patch looks

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Fujii Masao
On Fri, May 9, 2014 at 10:03 PM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-09 22:01:07 +0900, Fujii Masao wrote: On Wed, May 7, 2014 at 11:55 AM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Tue, May 6, 2014 at 8:25 PM, Michael Paquier michael.paqu...@gmail.com

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Michael Paquier
On Fri, May 9, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: Yes unless many people object the commit. Michael, You're now modifying the patch? Not within a couple of days. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Fri, May 9, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: Yes unless many people object the commit. Michael, You're now modifying the patch? Not within a couple of days. I think it's really too late for this for 9.4. At

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Fabrízio de Royes Mello
On Fri, May 9, 2014 at 10:18 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-09 22:14:25 +0900, Michael Paquier wrote: On Fri, May 9, 2014 at 10:01 PM, Fujii Masao masao.fu...@gmail.com wrote: +DATA(insert OID = 3260 (403pglsn_opsPGNSP PGUID ));

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Fabrízio de Royes Mello
On Fri, May 9, 2014 at 8:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: On Fri, May 9, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: Yes unless many people object the commit. Michael, You're now modifying the patch? Not within

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Fri, May 9, 2014 at 8:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think it's really too late for this for 9.4. At this point it's less than 48 hours until beta1 wraps, and we do not have the bandwidth to do anything

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Fabrízio de Royes Mello
On Fri, May 9, 2014 at 9:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= fabriziome...@gmail.com writes: On Fri, May 9, 2014 at 8:42 PM, Tom Lane t...@sss.pgh.pa.us wrote: I think it's really too late for this for 9.4. At this point it's less than 48

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-09 Thread Michael Paquier
On Fri, May 9, 2014 at 10:49 PM, Fujii Masao masao.fu...@gmail.com wrote: On Fri, May 9, 2014 at 10:03 PM, Andres Freund and...@2ndquadrant.com wrote: You plan to commit it? Yes unless many people object the commit. Michael, you're now modifying the patch? OK, I have been able to put my head

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-08 Thread Andres Freund
Hi, On 2014-05-06 23:55:04 -0300, Fabrízio de Royes Mello wrote: If helps, I added some regression tests to the lastest patch. I think we should apply this patch now. It's much more sensible with the opclasses present and we don't win anything by waiting for 9.5. Greetings, Andres Freund --

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-07 Thread Michael Paquier
On Wed, May 7, 2014 at 1:21 PM, Craig Ringer cr...@2ndquadrant.com wrote: On 05/07/2014 07:16 AM, Michael Paquier wrote: On Wed, May 7, 2014 at 8:07 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-06 22:49:07 +0900, Michael Paquier wrote: FWIW, the format you're using makes applying

[HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Andres Freund
Hi, Craig just mentioned in an internal chat that there's no btree or even hash opclass for the new pg_lsn type. That restricts what you can do with it quite severely. Imo this should be fixed for 9.4 - after all it was possible unto now to index a table with lsns returned by system functions or

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: Craig just mentioned in an internal chat that there's no btree or even hash opclass for the new pg_lsn type. That restricts what you can do with it quite severely. Imo this should be fixed for 9.4 - after all it was possible unto now to index a

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Andres Freund
On 2014-05-06 09:37:54 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: Craig just mentioned in an internal chat that there's no btree or even hash opclass for the new pg_lsn type. That restricts what you can do with it quite severely. Imo this should be fixed for 9.4 -

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Michael Paquier
On Tue, May 6, 2014 at 4:14 PM, Andres Freund and...@2ndquadrant.com wrote: Hi, Craig just mentioned in an internal chat that there's no btree or even hash opclass for the new pg_lsn type. That restricts what you can do with it quite severely. Imo this should be fixed for 9.4 - after all it

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Tom Lane
Andres Freund and...@2ndquadrant.com writes: On 2014-05-06 09:37:54 -0400, Tom Lane wrote: Sorry, it is *way* too late for 9.4. It's imo a regression/oversight introduced in the pg_lsn patch. Not a new feature. You can argue that if you like, but it doesn't matter. It's too late for a

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Heikki Linnakangas
On 05/06/2014 05:17 PM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-05-06 09:37:54 -0400, Tom Lane wrote: Sorry, it is *way* too late for 9.4. It's imo a regression/oversight introduced in the pg_lsn patch. Not a new feature. You can argue that if you like, but it

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Vik Fearing
On 05/06/2014 04:59 PM, Heikki Linnakangas wrote: On 05/06/2014 05:17 PM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-05-06 09:37:54 -0400, Tom Lane wrote: Sorry, it is *way* too late for 9.4. It's imo a regression/oversight introduced in the pg_lsn patch. Not a new

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Michael Paquier
On Tue, May 6, 2014 at 10:49 PM, Michael Paquier michael.paqu...@gmail.com wrote: Makes sense, especially knowing operators needed for btree processing are already defined. Patch attached solves that. Please find attached an updated patch, I completely forgot that the compare function needs to

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Andres Freund
Hi, On 2014-05-06 22:49:07 +0900, Michael Paquier wrote: Makes sense, especially knowing operators needed for btree processing are already defined. Patch attached solves that. Thanks for doing that quickly. FWIW, the format you're using makes applying the patch including the commit message

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Michael Paquier
On Wed, May 7, 2014 at 8:07 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-06 22:49:07 +0900, Michael Paquier wrote: FWIW, the format you're using makes applying the patch including the commit message relatively hard. Consider using git format-patch. Could you be clearer? By

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Andres Freund
On 2014-05-07 08:16:38 +0900, Michael Paquier wrote: On Wed, May 7, 2014 at 8:07 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-06 22:49:07 +0900, Michael Paquier wrote: FWIW, the format you're using makes applying the patch including the commit message relatively hard. Consider

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Michael Paquier
On Wed, May 7, 2014 at 8:22 AM, Andres Freund and...@2ndquadrant.com wrote: Uh. They're different: Datum timestamp_hash(PG_FUNCTION_ARGS) { /* We can use either hashint8 or hashfloat8 directly */ #ifdef HAVE_INT64_TIMESTAMP return hashint8(fcinfo); #else return

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Fabrízio de Royes Mello
On Tue, May 6, 2014 at 8:25 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Wed, May 7, 2014 at 8:22 AM, Andres Freund and...@2ndquadrant.com wrote: Uh. They're different: Datum timestamp_hash(PG_FUNCTION_ARGS) { /* We can use either hashint8 or hashfloat8 directly */

Re: [HACKERS] New pg_lsn type doesn't have hash/btree opclasses

2014-05-06 Thread Craig Ringer
On 05/07/2014 07:16 AM, Michael Paquier wrote: On Wed, May 7, 2014 at 8:07 AM, Andres Freund and...@2ndquadrant.com wrote: On 2014-05-06 22:49:07 +0900, Michael Paquier wrote: FWIW, the format you're using makes applying the patch including the commit message relatively hard. Consider using