Converting yes or no to one letter strings.

2019-06-04 Thread Lou
Hi everyone, Is it possible to convert a boolean yes or no field to hold a one letter string? For example, the strings: 's' 'f' 'p' 'e' To start off, I just need to convert true to 's'. false will have to be manually changed to 'f' or 'p' or 'e' as appropriate. Lou

Logical replication failed recovery

2019-04-07 Thread Lou Tseng
: could not receive data from WAL stream: ERROR: requested WAL segment 0001520800EB has already been removed 2019-04-07 12:28:37.182 UTC [114186] LOG: worker process: logical replication worker for subscription 8907992 (PID 22292) exited with exit code 1 Lou Tseng lts

Re: Seeded Replication

2019-04-03 Thread Lou Tseng
Thank you Adrian. copy_data = false did the trick! Lou Tseng lts...@advancedpricing.com<mailto:lts...@advancedpricing.com> [http://advancedpricing.com/wp-content/uploads/logo_AMPS_email.png]<http://www.advancedpricing.com/> Advanced Medical Pricing Solutions<http://advancedp

Re: Lingering replication slots

2019-04-03 Thread Lou Tseng
Thank you. Wasn't able to drop replication slot because it's still active. Arjun suggested pg_terminate_backend() and it did the trick. Thanks a lot! Lou Tseng lts...@advancedpricing.com<mailto:lts...@advancedpricing.com> [http://advancedpricing.com/wp-content/uploads/logo_AMPS_ema

Lingering replication slots

2019-04-03 Thread Lou Tseng
Hi, A newbie question: how do I delete lingering replication slots? When creating Subscription for logical replication, the CREATE SUBSCRIPTION stuck and didn't return. After ctrl-c and aborted the command, the master database have lingering replication slots that I can't delete because the

Re: Seeded Replication

2019-04-03 Thread Lou Tseng
ALTER SUBSCRIPTION ... ENABLE --> errors occur here Thoughts? Lou Tseng lts...@advancedpricing.com<mailto:lts...@advancedpricing.com> [http://advancedpricing.com/wp-content/uploads/logo_AMPS_email.png]<http://www.advancedpricing.com/> Advanced Medical Pricing

Seeded Replication

2019-04-03 Thread Lou Tseng
nique constraint" errors. Basically postgresql does not recognize the primary key. Any thought / suggestion is helpful! Lou Tseng lts...@advancedpricing.com<mailto:lts...@advancedpricing.com> [http://advancedpricing.com/wp-content/uploads/logo_AMPS_email.png]<http://www.advancedpri