|
From: xiong w. <wan...@gm...> - 2010-12-08 10:33:46
|
Dears,
steps:
postgres=# create sequence seq start with 1;
CREATE SEQUENCE
postgres=# create table t(a int default nextval('seq'), b int);
ERROR: Could not commit (or autocommit) data node connection
datanode log as follows:
LOG: statement: create table t(a int default nextval('seq'), b int);
ERROR: relation "seq" does not exist
When I checked the source code, I found sequence can't be created on
datanodes. Could you explain why?
Regards,
Benny
|
|
From: Koichi S. <ko...@in...> - 2010-12-09 00:36:50
|
In the current implementation, sequence value is supplied by GTM, as you
know. It is assumed that this value is supplied to the datanode
through the coordinator. In the case of your case, default value must
be handled by the datanode and the datanode has to inquire GTM for the
nextval of the sequence.
I'm afraid this is missing in the current code.
---
Koichi
(2010年12月08日 19:33), xiong wang wrote:
> Dears,
>
> steps:
> postgres=# create sequence seq start with 1;
> CREATE SEQUENCE
> postgres=# create table t(a int default nextval('seq'), b int);
> ERROR: Could not commit (or autocommit) data node connection
>
> datanode log as follows:
> LOG: statement: create table t(a int default nextval('seq'), b int);
> ERROR: relation "seq" does not exist
>
> When I checked the source code, I found sequence can't be created on
> datanodes. Could you explain why?
>
> Regards,
> Benny
>
> ------------------------------------------------------------------------------
> What happens now with your Lotus Notes apps - do you make another costly
> upgrade, or settle for being marooned without product support? Time to move
> off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
> use, and manage than apps on traditional platforms. Sign up for the Lotus
> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
> _______________________________________________
> Postgres-xc-developers mailing list
> Pos...@li...
> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers
>
|
|
From: xiong w. <wan...@gm...> - 2010-12-09 01:11:12
|
Hi Koichi,
Yes, I consider sequence should be created on datanodes but not only
on coordinators. But all the sequence value should be from GTM.
Regards,
Benny
2010/12/9 Koichi Suzuki <ko...@in...>:
> In the current implementation, sequence value is supplied by GTM, as you
> know. It is assumed that this value is supplied to the datanode through
> the coordinator. In the case of your case, default value must be handled
> by the datanode and the datanode has to inquire GTM for the nextval of the
> sequence.
>
> I'm afraid this is missing in the current code.
> ---
> Koichi
>
> (2010年12月08日 19:33), xiong wang wrote:
>>
>> Dears,
>>
>> steps:
>> postgres=# create sequence seq start with 1;
>> CREATE SEQUENCE
>> postgres=# create table t(a int default nextval('seq'), b int);
>> ERROR: Could not commit (or autocommit) data node connection
>>
>> datanode log as follows:
>> LOG: statement: create table t(a int default nextval('seq'), b int);
>> ERROR: relation "seq" does not exist
>>
>> When I checked the source code, I found sequence can't be created on
>> datanodes. Could you explain why?
>>
>> Regards,
>> Benny
>>
>>
>> ------------------------------------------------------------------------------
>> What happens now with your Lotus Notes apps - do you make another costly
>> upgrade, or settle for being marooned without product support? Time to
>> move
>> off Lotus Notes and onto the cloud with Force.com, apps are easier to
>> build,
>> use, and manage than apps on traditional platforms. Sign up for the Lotus
>> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>> _______________________________________________
>> Postgres-xc-developers mailing list
>> Pos...@li...
>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers
>>
>
>
|
|
From: Mason S. <mas...@en...> - 2010-12-09 13:39:24
|
On 12/8/10 8:11 PM, xiong wang wrote:
> Hi Koichi,
>
> Yes, I consider sequence should be created on datanodes but not only
> on coordinators. But all the sequence value should be from GTM.
>
> Regards,
> Benny
> 2010/12/9 Koichi Suzuki <ko...@in...>:
>> In the current implementation, sequence value is supplied by GTM, as you
>> know. It is assumed that this value is supplied to the datanode through
>> the coordinator. In the case of your case, default value must be handled
>> by the datanode and the datanode has to inquire GTM for the nextval of the
>> sequence.
>>
>> I'm afraid this is missing in the current code.
>> ---
>> Koichi
Benny,
In general we try and have the Coordinator manage everything and provide
the data nodes with everything they need.
I can think of a case that we should test though, when COPY is used. We
would have to make sure that we are providing values for the sequence
column if it is not included in an explicit column list.
Thanks,
Mason
>> (2010年12月08日 19:33), xiong wang wrote:
>>> Dears,
>>>
>>> steps:
>>> postgres=# create sequence seq start with 1;
>>> CREATE SEQUENCE
>>> postgres=# create table t(a int default nextval('seq'), b int);
>>> ERROR: Could not commit (or autocommit) data node connection
>>>
>>> datanode log as follows:
>>> LOG: statement: create table t(a int default nextval('seq'), b int);
>>> ERROR: relation "seq" does not exist
>>>
>>> When I checked the source code, I found sequence can't be created on
>>> datanodes. Could you explain why?
>>>
>>> Regards,
>>> Benny
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> What happens now with your Lotus Notes apps - do you make another costly
>>> upgrade, or settle for being marooned without product support? Time to
>>> move
>>> off Lotus Notes and onto the cloud with Force.com, apps are easier to
>>> build,
>>> use, and manage than apps on traditional platforms. Sign up for the Lotus
>>> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>>> _______________________________________________
>>> Postgres-xc-developers mailing list
>>> Pos...@li...
>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers
>>>
>>
> ------------------------------------------------------------------------------
> This SF Dev2Dev email is sponsored by:
>
> WikiLeaks The End of the Free Internet
> http://p.sf.net/sfu/therealnews-com
> _______________________________________________
> Postgres-xc-developers mailing list
> Pos...@li...
> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers
--
Mason Sharp
EnterpriseDB Corporation
The Enterprise Postgres Company
This e-mail message (and any attachment) is intended for the use of
the individual or entity to whom it is addressed. This message
contains information from EnterpriseDB Corporation that may be
privileged, confidential, or exempt from disclosure under applicable
law. If you are not the intended recipient or authorized to receive
this for the intended recipient, any use, dissemination, distribution,
retention, archiving, or copying of this communication is strictly
prohibited. If you have received this e-mail in error, please notify
the sender immediately by reply e-mail and delete this message.
|
|
From: Koichi S. <ko...@in...> - 2010-12-09 01:15:12
|
This should be put into the track.
I discussed with Michael and found that the issue is not that simple
because we should consider the case of the replicated table. It is not
correct to get sequence value directly from GTM to Datanode in this
case. Coordinator should handle this.
Regards;
---
Koichi
(2010年12月09日 10:11), xiong wang wrote:
> Hi Koichi,
>
> Yes, I consider sequence should be created on datanodes but not only
> on coordinators. But all the sequence value should be from GTM.
>
> Regards,
> Benny
>
> 2010/12/9 Koichi Suzuki<ko...@in...>:
>> In the current implementation, sequence value is supplied by GTM, as you
>> know. It is assumed that this value is supplied to the datanode through
>> the coordinator. In the case of your case, default value must be handled
>> by the datanode and the datanode has to inquire GTM for the nextval of the
>> sequence.
>>
>> I'm afraid this is missing in the current code.
>> ---
>> Koichi
>>
>> (2010年12月08日 19:33), xiong wang wrote:
>>>
>>> Dears,
>>>
>>> steps:
>>> postgres=# create sequence seq start with 1;
>>> CREATE SEQUENCE
>>> postgres=# create table t(a int default nextval('seq'), b int);
>>> ERROR: Could not commit (or autocommit) data node connection
>>>
>>> datanode log as follows:
>>> LOG: statement: create table t(a int default nextval('seq'), b int);
>>> ERROR: relation "seq" does not exist
>>>
>>> When I checked the source code, I found sequence can't be created on
>>> datanodes. Could you explain why?
>>>
>>> Regards,
>>> Benny
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> What happens now with your Lotus Notes apps - do you make another costly
>>> upgrade, or settle for being marooned without product support? Time to
>>> move
>>> off Lotus Notes and onto the cloud with Force.com, apps are easier to
>>> build,
>>> use, and manage than apps on traditional platforms. Sign up for the Lotus
>>> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>>> _______________________________________________
>>> Postgres-xc-developers mailing list
>>> Pos...@li...
>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers
>>>
>>
>>
>
|
|
From: xiong w. <wan...@gm...> - 2010-12-23 06:51:27
|
Hi,
About the sequence, we tried to realize the executing by change the
statement. For example,
create table t(a int, b int default nextval('seq1'));
If we insert a tuple like insert into t values(1), we replace the
statement with insert into t values(1,2) (here, we assume
nextval('seq1') is 2).
But we met a problem that we couldn't process when we add a column
with default nextval('seq1') into a table which has multiple tuples.
Because the column needs increase automatically, we couldn't use a
proper sequence value to replace the default value.
For example:
create table t1(a int);
insert into t1 values(1),(1),(1);
select * from t1;
TEST=# select * from t1;
A
---
1
1
1
(3 行)
alter table t1 add column b int default nextval('seq1');
select * from t1;
TEST=# select * from t1;
A | B
---+----
1 | 1
1 | 2
1 | 3
(3 行)
Regards,
Benny
在 2010年12月9日 上午9:15,Koichi Suzuki <ko...@in...> 写道:
> This should be put into the track.
>
> I discussed with Michael and found that the issue is not that simple
> because we should consider the case of the replicated table. It is not
> correct to get sequence value directly from GTM to Datanode in this
> case. Coordinator should handle this.
>
> Regards;
> ---
> Koichi
>
> (2010年12月09日 10:11), xiong wang wrote:
>> Hi Koichi,
>>
>> Yes, I consider sequence should be created on datanodes but not only
>> on coordinators. But all the sequence value should be from GTM.
>>
>> Regards,
>> Benny
>>
>> 2010/12/9 Koichi Suzuki<ko...@in...>:
>>> In the current implementation, sequence value is supplied by GTM, as you
>>> know. It is assumed that this value is supplied to the datanode through
>>> the coordinator. In the case of your case, default value must be handled
>>> by the datanode and the datanode has to inquire GTM for the nextval of the
>>> sequence.
>>>
>>> I'm afraid this is missing in the current code.
>>> ---
>>> Koichi
>>>
>>> (2010年12月08日 19:33), xiong wang wrote:
>>>>
>>>> Dears,
>>>>
>>>> steps:
>>>> postgres=# create sequence seq start with 1;
>>>> CREATE SEQUENCE
>>>> postgres=# create table t(a int default nextval('seq'), b int);
>>>> ERROR: Could not commit (or autocommit) data node connection
>>>>
>>>> datanode log as follows:
>>>> LOG: statement: create table t(a int default nextval('seq'), b int);
>>>> ERROR: relation "seq" does not exist
>>>>
>>>> When I checked the source code, I found sequence can't be created on
>>>> datanodes. Could you explain why?
>>>>
>>>> Regards,
>>>> Benny
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> What happens now with your Lotus Notes apps - do you make another costly
>>>> upgrade, or settle for being marooned without product support? Time to
>>>> move
>>>> off Lotus Notes and onto the cloud with Force.com, apps are easier to
>>>> build,
>>>> use, and manage than apps on traditional platforms. Sign up for the Lotus
>>>> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
>>>> _______________________________________________
>>>> Postgres-xc-developers mailing list
>>>> Pos...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers
>>>>
>>>
>>>
>>
>
>
|