![]() ![]() ![]() I removed the archiving settings archive_mode and archive_command. I now have the following in my nf - and it is working as expected: wal_level = hot_standby When the young generation fills up, it causes a minor collection in which only the. The mistake I made was that I mixed up using archiving and using replication slots (thanks Frankie for your patience). Only when I'm confident I know how it works and how to set it up correctly will I start using replication in a production environment. Also note that this is a test setup, I will not lose any data. I'll make a backup of the data directory, which also has the logs. But note that I need to continue my work, I am now trying if I can promote slave to master and clean up the old broken master. If you need more information to be able to answer this, please let me know. I googled around and found that this happens if the archive_command, as set in nf on the master, is incorrect or missing.īut it is my understanding that when using replication slots I don't need an archive_command (and so, I didn't set an archive command). The next day my master server had crashed because the disk was full: PANIC: could not write to file "pg_xlog/xlogtemp.11700": No space left on device I restarted the db and everything seemed fine. Primary_conninfo = 'user=repuser password=geheim host= port= sslmode=prefer sslcompression=1 krbsrvname=postgres' However, this laborious severely limits the. Periodic CHECKPOINT's subsequently help to kick the xlog clean up into action. When this is running the pgxlog directory grows rapidly, and recovers very slowly. Occasionally I need to shift data on to a larger tablespace to prevent /var from filling up. On the slave machine, I started with the pg_basebackup: sudo -u postgres pg_basebackup -v -h -U repuser -D -R -Xs -P I'm running postgreSQL 9.6.0 on CentOS 7.2. I restarted the db and created a replication slot like so (as sudo -u postgres psql postgres): SELECT * FROM pg_create_physical_replication_slot('repslot001') I added a replication user to pg_hba.conf: host replication repuser md5 On the primary, I have in the nf: wal_level = hot_standby ![]() On both servers separately the database worked as expected (before setting up replication), including access from another Ubuntu server. I have one primary and one slave machine, both Ubuntu 14.04 with a cluster called main that is in a directory other than the default. I have replication set up on Postgresql 9.5 using replication slot. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |