On Wed, Nov 11, 2009 at 10:12 PM, tamanna madaan
wrote:
>
>
> Hi All
>
>
>
> I have a cluster setup with one master and one slave . Replication from
> master to slave is not taking place.
>
> I am getting this error “duplicate key violates unique constraint” in my
> slon.log on slave . This err
tamanna madaan wrote:
>
> I am getting this error "duplicate key violates unique constraint" in
> my slon.log on slave . This error is thrown while
>
> Slon is inserting a row in a table on slave. This must be because of
> the reason that duplicate rows
>
> are being returned while querying
Hi All
I have a cluster setup with one master and one slave . Replication from
master to slave is not taking place.
I am getting this error "duplicate key violates unique constraint" in
my slon.log on slave . This error is thrown while
Slon is inserting a row in a table on slave. This
2009/8/8
> Hello all,
>
> I have a table named "t_i_shift_shadow" with following spec
>
>
> Column | Type |
> Modifiers
>
> -+---+---
> cid | character varyi
Hello all,
I have a table named "t_i_shift_shadow" with following spec
Column | Type |
Modifiers
-+---+---
cid | character vary
Hey, I've just find out what's happening.
The problem is the "serial" datatype creates a sequence in the background
(project_id_seq). If the sequence current numeber is 1, and I manually insert
a new entry whit ID=2, the sequence doesn't "know" it. So when I try the
INSERT statement, the next value
Ron Johnson wrote:
# select * from projects;
project_id | username | project_name
- +--+--
1 | foo |
2 | bar |
(2 rows)
dupe_filenames=# insert into projects (project_name, username )
dupe_filenames-# values ('foo', 'bar');
ERROR:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/18/06 21:19, brian wrote:
> Ron Johnson wrote:
>> On 09/18/06 19:25, Jeff Davis wrote:
>>
>>> On Mon, 2006-09-18 at 19:47 -0300, [EMAIL PROTECTED] wrote:
>>>
Hi,
I'm trying to create a table with a PRIMARY KEY. The CREATE
stat
Ron Johnson wrote:
On 09/18/06 19:25, Jeff Davis wrote:
On Mon, 2006-09-18 at 19:47 -0300, [EMAIL PROTECTED] wrote:
Hi,
I'm trying to create a table with a PRIMARY KEY. The CREATE statement looks
like this:
CREATE TABLE "projects" (
"project_id" serial,
"username" varchar(30) NOT NULL de
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 09/18/06 19:25, Jeff Davis wrote:
> On Mon, 2006-09-18 at 19:47 -0300, [EMAIL PROTECTED] wrote:
>> Hi,
>>
>> I'm trying to create a table with a PRIMARY KEY. The CREATE statement looks
>> like this:
>>
>> CREATE TABLE "projects" (
>> "project_id"
On Mon, 2006-09-18 at 19:47 -0300, [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to create a table with a PRIMARY KEY. The CREATE statement looks
> like this:
>
> CREATE TABLE "projects" (
> "project_id" serial,
> "username" varchar(30) NOT NULL default '',
> "project_name" varchar(30) NOT
Hi,
I'm trying to create a table with a PRIMARY KEY. The CREATE statement looks
like this:
CREATE TABLE "projects" (
"project_id" serial,
"username" varchar(30) NOT NULL default '',
"project_name" varchar(30) NOT NULL default '',
PRIMARY KEY ("project_id")
) ;
The problem is that somet
Thanx to Richard Huxton and Csaba.
I will upgrade PostgreSQL up to 8.0 and use:
> 2. Catch the error on the insert and try the update again. This
> requires version 8.0 or higher.
Best regards
---(end of broadcast)---
TIP 8: explain analyze is yo
Csaba Nagy wrote:
That would work indeed. Bit I guess the savepoint solution will be the
simplest and fastest if the OP has or can install 8.0 version.
I'd say so. Otherwise you'll just sit on the lock, and then still have
to deal with an error later anyway when the lock times out.
--
Rich
That would work indeed. Bit I guess the savepoint solution will be the
simplest and fastest if the OP has or can install 8.0 version.
Cheers,
Csaba.
On Mon, 2005-06-13 at 17:49, Richard Huxton wrote:
> Csaba Nagy wrote:
> > [snip]
> >
> >>If you have more than one client, this can always happen.
Csaba Nagy wrote:
[snip]
If you have more than one client, this can always happen. You have two
choices:
1. Use a lock to stop two clients interacting like this
This won't work unless you make all the clients serialized, or you have
all the ip's already inserted in the data base... you can
[snip]
> If you have more than one client, this can always happen. You have two
> choices:
> 1. Use a lock to stop two clients interacting like this
This won't work unless you make all the clients serialized, or you have
all the ip's already inserted in the data base... you can't lock on an
unk
ON.KG wrote:
before inserting or updating this table there're some checkings,
logs, etc., so I'm using PL/PgSQL for that
after all checkings and logs I have:
UPDATE table1
SET hits = hits + 1
WHERE ip = some_ip;
IF NOT FOUND THEN
INSERT INTO table1
Your problem is that the trigger's "found" check will not see the row
inserted by a concurrent transaction. In other words, your insert
actually fails, the record what you see was inserted by another
concurrent transaction, and the "found" check didn't work because the
other transaction started aft
Hi All!
I have table:
CREATE TABLE table1 (
ip char(15) NOT NULL,
hits integer NOT NULL default '1',
PRIMARY KEY (ip)
);
So it's counting hits per each IP for current day and every day
trancated by cron:
TRUNCATE TABLE table1;
before inserting or updating this table there're some check
postgresql 7.4.0, redhat 7.3 (under vmware 4.0 on win2k)
Windows crashed and some of the files on Redhat got corrupted, including
some files in /var/lib/pgsql/data/pg_xlog/. When I tried to start
postmaster, it fails with message "Invalid primary checkPoint record". I
think it was trying to look f
21 matches
Mail list logo