Table Partitioning with Foreign Data Wrapper

Поиск
Список
Период
Сортировка
От Ranjeet Verma
Тема Table Partitioning with Foreign Data Wrapper
Дата
Msg-id CAFc8SBav2H4q1tEL+AjUe0T1eVhjaUevwy4A58YehP5RjEkRaw@mail.gmail.com
обсуждение исходный текст
Список pgsql-sql
Hello,
I need your kind assistance, to learn if it is possible the partition within a table in foreign server.
Actually I have integrated the whole process but UPDATE and DELETE script not working fine.


Here is Example:
For example Server001 is a main server and Server002 is a secondary server. At Server001 we have created foreign data wrapper and create a foreign table and same table replica has been created at Server002. These functionality are working fine.

Now I have partitioned the table at Server002 into five partition also having the parent table. and I have attached the BEFORE INSERT trigger on Parent Table and BEFORE UPDATE and DELETE trigger attached in the all child tables.

When I try to INSERT, UPDATE and DELETE on parent table (which are possible by your inheritance process), the INSERT script are working fine but UPDATE and DELETE script not working properly. Actually on single row update it gives the multiple updates on another child tables randomly. Same error is coming to DELETE case.



EXAMPLE:
update table_name set applicant_name='Tom Hank' where applicant_id=100; (where applicant_id is primary key and every record in table are unique.)

When I execute the above SQL script, randomly 3 or 4  records with applicant_name "Tom Hank" has been updated in another table with out maching any criteria in where condition. Also these records does not contains any relation with updated records.



Kindly tell me what I am doing wrong??

Thanks & Regards
Ranjeet Verma
M: -9717991020

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

Предыдущее
От: Michael Moore
Дата:
Сообщение: Re: Using TEMP ON COMMIT DROP, but need logging too.
Следующее
От: Benjamin Dietrich
Дата:
Сообщение: Re: Using TEMP ON COMMIT DROP, but need logging too.