Re: Sequence Access Method WIP

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: Sequence Access Method WIP
Дата
Msg-id CAFcNs+pKtc6Y9vUO8TYN0vGcAkTgON0iPPKgCTp6S5_j7JwnfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sequence Access Method WIP  (Petr Jelinek <petr@2ndquadrant.com>)
Ответы Re: Sequence Access Method WIP  (David Steele <david@pgmasters.net>)
Список pgsql-hackers
<div dir="ltr"><div class="gmail_extra">On Thu, Mar 24, 2016 at 6:12 PM, Petr Jelinek <<a
href="mailto:petr@2ndquadrant.com"target="_blank">petr@2ndquadrant.com</a>> wrote:<br />><br />> Hi,<br
/>><br/>> I rebased this on top of the recently committed CREATE ACCESS METHOD.<br />><br /><br /></div><div
class="gmail_extra">Hi,<br/><br /></div><div class="gmail_extra">I got the above error trying to apply to the current
master:<br/><br />$ git apply /home/fabrizio/Downloads/0001-seqam-2016-03-24.patch<br />error: patch failed:
src/backend/commands/amcmds.c:29<br/>error: src/backend/commands/amcmds.c: patch does not apply<br /><br /><br
/></div><divclass="gmail_extra">There are a wrong definition at the beginning of the amcmds.c:<br /><br /> 34
<<<<<<<ours<br /> 35 static Oid  lookup_index_am_handler_func(List *handler_name, char amtype);<br
/> 36static const char *get_am_type_string(char amtype);<br /> 37 =======<br /> 38 static Oid 
lookup_am_handler_func(List*handler_name, char amtype);<br /> 39 static char *get_am_type_string(char amtype);<br /> 40
>>>>>>>theirs<br /><br /></div><div class="gmail_extra"><br /></div><div class="gmail_extra">After
thissmall fix I can build and ran regress tests without errors.<br /><br />But running "check-world" I got the
error:<br/><br />make[1]: Leaving directory `/data/postgresql/src/test/regress'<br />make: Leaving directory
`/data/postgresql'<br/>+ pg_dumpall -f /data/postgresql/src/bin/pg_upgrade/tmp_check/dump1.sql<br />ok 9 - dropuser
foobar1exit code 0<br />ok 10 - SQL DROP ROLE run: SQL found in server log<br />ok 11 - fails with nonexistent user<br
/>ok<br/>t/<a href="http://080_pg_isready.pl">080_pg_isready.pl</a> ....... <br />1..10<br />ok 1 - pg_isready --help
exitcode 0<br />ok 2 - pg_isready --help goes to stdout<br />ok 3 - pg_isready --help nothing to stderr<br />ok 4 -
pg_isready--version exit code 0<br />ok 5 - pg_isready --version goes to stdout<br />ok 6 - pg_isready --version
nothingto stderr<br />ok 7 - pg_isready with invalid option nonzero exit code<br />ok 8 - pg_isready with invalid
optionprints error message<br />ok 9 - fails with no server running<br />pg_dump: [archiver (db)] query failed: ERROR: 
column"sequence_name" does not exist<br />LINE 1: SELECT sequence_name, start_value, increment_by, CASE WHEN i...<br
/>              ^<br />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_cycledFROM check_seq<br />pg_dumpall: pg_dump failed on database "regression", exiting<br />+
pg_dumpall1_status=1<br/>+ [ /data/postgresql != /data/postgresql ]<br />+
/data/postgresql/src/bin/pg_upgrade/tmp_check/install//home/fabrizio/pgsql/bin/pg_ctl-m fast stop<br />waiting for
serverto shut down.... done<br />server stopped<br />+ [ -n  ]<br />+ [ -n  ]<br />+ [ -n 1 ]<br />+ echo pg_dumpall of
pre-upgradedatabase cluster failed<br />pg_dumpall of pre-upgrade database cluster failed<br />+ exit 1<br />+ rm -rf
/tmp/pg_upgrade_check-3NUa0X<br/>make[2]: *** [check] Error 1<br />make[2]: Leaving directory
`/data/postgresql/src/bin/pg_upgrade'<br/>make[1]: *** [check-pg_upgrade-recurse] Error 2<br />make[1]: *** Waiting for
unfinishedjobs....<br /><br /><br /></div><div class="gmail_extra"><br />And testing pg_dump itself I got the same
errortrying to dump a database that contains a sequence.<br /><br />fabrizio=# create sequence x;<br />CREATE
SEQUENCE<br/>fabrizio=# \ds<br />          List of relations<br /> Schema | Name |   Type   |  Owner   <br
/>--------+------+----------+----------<br/> public | x    | sequence | fabrizio<br />(1 row)<br /><br />fabrizio=# \d
x<br/>                  Sequence "public.x"<br />    Column    |       Type        |        Value        <br
/>--------------+-------------------+---------------------<br/> start_value  | bigint            | 1<br /> increment_by
|bigint            | 1<br /> max_value    | bigint            | 9223372036854775807<br /> min_value    |
bigint           | 1<br /> cache_value  | bigint            | 1<br /> is_cycled    | boolean           | f<br
/> amstate     | seqam_local_state | (1,f,0)<br />Access Method: local<br /><br />fabrizio=# \q<br /><br
/>fabrizio@bagual:~/pgsql<br />$ bin/pg_dump > /tmp/fabrizio.sql<br />pg_dump: [archiver (db)] query failed: ERROR: 
column"sequence_name" does not exist<br />LINE 1: SELECT sequence_name, start_value, increment_by, CASE WHEN i...<br
/>              ^<br />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_cycledFROM x<br /><br /></div><div class="gmail_extra"><br /></div><div class="gmail_extra">Toninght I'll review
someparts of the code.<br /></div><div class="gmail_extra"><br /></div><div class="gmail_extra">Regards,<br
/></div><divclass="gmail_extra"><br /><br /></div><div class="gmail_extra">Att,<br /></div><div class="gmail_extra"><br
/>--<br/>Fabrízio de Royes Mello<br />Consultoria/Coaching PostgreSQL<br />>> Timbira: <a
href="http://www.timbira.com.br"target="_blank">http://www.timbira.com.br</a><br />>> Blog: <a
href="http://fabriziomello.github.io"target="_blank">http://fabriziomello.github.io</a><br />>> Linkedin: <a
href="http://br.linkedin.com/in/fabriziomello"target="_blank">http://br.linkedin.com/in/fabriziomello</a><br />>>
Twitter:<a href="http://twitter.com/fabriziomello" target="_blank">http://twitter.com/fabriziomello</a><br />>>
Github:<a href="http://github.com/fabriziomello" target="_blank">http://github.com/fabriziomello</a></div></div> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Dealing with collation and strcoll/strxfrm/etc
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Dealing with collation and strcoll/strxfrm/etc