Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

PK update #33

Open
sebastianwebber opened this issue May 12, 2014 · 1 comment
Open

PK update #33

sebastianwebber opened this issue May 12, 2014 · 1 comment

Comments

@sebastianwebber
Copy link

Hi,

there is any reason to block primary key updates?

@sebastianwebber
Copy link
Author

I tried comment the lines 210 and 211 from the 'sql/pgq/triggers/makesql.c' file, but all rows with updated primary keys are not changed.

on master i run:

teste_replica=# \d pessoa
                                        Table "public.pessoa"
     Column      |            Type             |                      Modifiers
-----------------+-----------------------------+-----------------------------------------------------
 id              | integer                     | not null default nextval('pessoa_id_seq'::regclass)
 nome            | text                        | not null
 data_nascimento | date                        | not null
 ultima_visita   | timestamp without time zone | not null default now()
 biografia       | text                        |
Indexes:
    "pessoa_pkey" PRIMARY KEY, btree (id)
Triggers:
    _londiste_q_teste_replica AFTER INSERT OR DELETE OR UPDATE ON pessoa FOR EACH ROW EXECUTE PROCEDURE pgq.logutriga('q_teste_replica')
    _londiste_q_teste_replica_truncate AFTER TRUNCATE ON pessoa FOR EACH STATEMENT EXECUTE PROCEDURE pgq.sqltriga('q_teste_replica')

teste_replica=# update pessoa set id = id + 10000;
UPDATE 4000

On log file, the message 'table is lost' appears:

Part of the log file:

2014-05-12 15:28:20,736 14245 INFO {count: 1, duration: 0.019, idle: 39.3186}
2014-05-12 15:28:20,811 14330 INFO pgq.maint_operations is installed
2014-05-12 15:28:20,813 14330 ERROR copy_sync: lost table: public.pessoa

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant