Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P1111
some replication commands
Active
Public
Actions
Authored by
ardumont
on Aug 2 2021, 9:53 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
* Replication
** main db: publication
connect to main db softwareheritage:
#+BEGIN_SRC sql
select * from pg_publication_tables;
alter publication softwareheritage add table <new-table>;
-- alter publication softwareheritage drop table metadata_fetcher;
-- alter publication softwareheritage drop table metadata_authority;
-- alter publication softwareheritage drop table origin_metadata;
#+END_SRC
** replica: subscription
#+BEGIN_SRC sh
-- subscription
select * from pg_subscription;
-- update schema with new table (or renamed target tables)
-- refresh publication out of the main mirror
alter subscription softwareheritage_replica refresh publication;
--
select relname from pg_subscription_rel left join pg_class on srrelid=oid;
#+END_SRC
Event Timeline
ardumont
created this paste.
Aug 2 2021, 9:53 AM
2021-08-02 09:53:31 (UTC+2)
Log In to Comment