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 sl_log_1
On Wed, Nov 11, 2009 at 10:12 PM, tamanna madaan
tamanna.ma...@globallogic.com 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
2009/8/8 sw...@opspl.com
Hello all,
I have a table named t_i_shift_shadow with following spec
Column | Type |
Modifiers
-+---+---
cid | character
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:
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 in
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 NULL default
-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 serial,
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 default
-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
statement looks
like this:
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
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 after
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
[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
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
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. You
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.
--
16 matches
Mail list logo