Re: Sequence Access Method WIP

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sequence Access Method WIP
Date: 2016-03-29 17:46:53
Message-ID: CAFcNs+r-8JAX-WrK+CZsjXMCqRZo7pp0iujj-q9Uei7ysOX8=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 29, 2016 at 2:26 PM, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
>
> On 29/03/16 18:50, Fabrízio de Royes Mello wrote:
>>
>>
>>
>> On Tue, Mar 29, 2016 at 12:25 PM, David Steele <david(at)pgmasters(dot)net
>> <mailto:david(at)pgmasters(dot)net>> wrote:
>> >
>> > Hi Petr,
>> >
>> > On 3/28/16 3:11 PM, Fabrízio de Royes Mello wrote:
>> >
>> >> fabrizio(at)bagual:~/pgsql
>> >> $ bin/pg_dump > /tmp/fabrizio.sql
>> >> pg_dump: [archiver (db)] query failed: ERROR: column "sequence_name"
>> >> does not exist
>> >> LINE 1: SELECT sequence_name, start_value, increment_by, CASE WHEN
i...
>> >> ^
>> >> pg_dump: [archiver (db)] query was: SELECT sequence_name,
start_value,
>> >> increment_by, CASE WHEN increment_by > 0 AND max_value =
>> >> 9223372036854775807 THEN NULL WHEN increment_by < 0 AND
max_value =
>> >> -1 THEN NULL ELSE max_value END AS max_value, CASE WHEN
>> >> increment_by > 0 AND min_value = 1 THEN NULL WHEN increment_by
< 0
>> >> AND min_value = -9223372036854775807 THEN NULL ELSE min_value
END
>> >> AS min_value, cache_value, is_cycled FROM x
>> >
>> >
>> > It looks like a new patch is needed. I've marked this "waiting on
>> author".
>> >
>>
>
> Yeah there were some incompatible commits since my last rebase, fixed,
along with the pg_dump bugs..
>

Now all applies without errors, build and "make check" too.

>> But there are other issue in the gapless-seq extension when I ran "make
>> check":
>>
>> 43 CREATE EXTENSION gapless_seq;
>> 44 CREATE SEQUENCE test_gapless USING gapless;
>> 45 SELECT nextval('test_gapless'::regclass);
>> 46 ! ERROR: could not access status of transaction 1275068416
>> 47 ! DETAIL: Could not open file "pg_subtrans/4C00": No such file or
>> directory.
>> 48 BEGIN;
>> 49 SELECT nextval('test_gapless'::regclass);
>> 50 ! ERROR: could not access status of transaction 1275068416
>> 51 ! DETAIL: Could not open file "pg_subtrans/4C00": No such file or
>> directory.
>> 52 SELECT nextval('test_gapless'::regclass);
>> 53 ! ERROR: current transaction is aborted, commands ignored until
>> end of transaction block
>> 54 SELECT nextval('test_gapless'::regclass);
>> 55 ! ERROR: current transaction is aborted, commands ignored until
>> end of transaction block
>> 56 ROLLBACK;
>> 57 SELECT nextval('test_gapless'::regclass);
>> 58 ! ERROR: could not access status of transaction 1275068416
>> 59 ! DETAIL: Could not open file "pg_subtrans/4C00": No such file or
>> directory.
>>
>>
>> And I see the same running manually:
>>
>> fabrizio=# create extension gapless_seq;
>> CREATE EXTENSION
>> fabrizio=# create sequence x using gapless;
>> CREATE SEQUENCE
>> fabrizio=# select nextval('x');
>> ERROR: could not access status of transaction 1258291200
>> DETAIL: Could not open file "pg_subtrans/4B00": No such file or
directory.
>>
>> Regards,
>>
>
> Hmm I am unable to reproduce this. What OS? Any special configure flags
you use?
>

In my environment the error remains with your last patches.

I didn't use any special.

./configure --prefix=/home/fabrizio/pgsql --enable-cassert
--enable-coverage --enable-tap-tests --enable-depend
make -s -j8 install
make check-world

My environment:

fabrizio(at)bagual:/d/postgresql (0002-gapless-seq-petr)
$ uname -a
Linux bagual 3.13.0-83-generic #127-Ubuntu SMP Fri Mar 11 00:25:37 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux

fabrizio(at)bagual:/d/postgresql (0002-gapless-seq-petr)
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2016-03-29 17:50:10 Re: pgbench - show weight percent
Previous Message Andres Freund 2016-03-29 17:42:39 Re: Move PinBuffer and UnpinBuffer to atomics