Re: PostgreSQL starting with a corrupted database or other fatal issues

2021-09-10 Thread David G. Johnston
On Friday, September 10, 2021, Keith Christian wrote: > > Where would I find details about this situation in the PG docs?. > > As far as PostgreSQL is concerned if startup fails it tries to log that fact then stops. If doesn’t care whether it’s being started by hand, via systemd, or even cron, an

Unable to drop invalid TOAST indexes

2021-09-10 Thread gabrielle
Hello! I ran into an interesting situation last week. Discovered on RDS Postgres version 13. Replicated on community Postgres version 13. A client wanted us to drop some invalid indexes, some of which turned out to be invalid indexes on TOAST tables. We don't know for sure how their database got

PostgreSQL starting with a corrupted database or other fatal issues

2021-09-10 Thread Keith Christian
Assuming that PostgreSQL is started by systemd, and encounters fatal issues, how often does systemd attempt to re-start it before giving up? I'm not familiar with that interaction and if systemd stops after X attempts, or what. What does postgres do when it encounters fatal issues and cannot star

Re: Is there any technical reason why "alter table .. set not null" can't use index?

2021-09-10 Thread hubert depesz lubaczewski
On Fri, Sep 10, 2021 at 01:26:46PM -0400, Gus Spier wrote: > Would it help to create a new not null column in the target table, and > then update the table by copying values from old column to the new, > not null column? Of course you’d have to ignore errors, etc. but > wouldn’t that perform at eno

Re: Is there any technical reason why "alter table .. set not null" can't use index?

2021-09-10 Thread Gus Spier
Would it help to create a new not null column in the target table, and then update the table by copying values from old column to the new, not null column? Of course you’d have to ignore errors, etc. but wouldn’t that perform at enough for your needs? Sent from my iPhone > On Sep 8, 2021, at 1

Re: How to observe plan_cache_mode transition from custom to generic plan?

2021-09-10 Thread Richard Michael
On Fri, Sep 10, 2021 at 10:38 AM Laurenz Albe wrote: > On Thu, 2021-09-09 at 16:51 +0200, Richard Michael wrote: > > > > 2/ EXPLAIN EXECUTE of prepared statement doesn't show query text, as > the > > > > documentation seems to imply. Should it? > > > > > > Yes, and it does for me - see below. >

Re: How to observe plan_cache_mode transition from custom to generic plan?

2021-09-10 Thread Richard Michael
On Thu, Sep 9, 2021 at 7:39 PM Tom Lane wrote: > Richard Michael writes: > > Would a tiny patch to the PREPARE docs be accepted? I'd like to help > > clarify investigating `plan_cache_mode` for future readers. > > What did you have in mind? > > (I'm kind of allergic to documenting the plan-cach

Re: How to observe plan_cache_mode transition from custom to generic plan?

2021-09-10 Thread Laurenz Albe
On Thu, 2021-09-09 at 16:51 +0200, Richard Michael wrote: > > > 2/ EXPLAIN EXECUTE of prepared statement doesn't show query text, as the > > > documentation seems to imply.  Should it? > > > > Yes, and it does for me - see below. > > I do not see the query text in your EXPLAIN EXECUTE output.  Pe

Re: Postgresql 11: terminating walsender process due to replication timeout

2021-09-10 Thread Abhishek Bhola
So is there any solution to this issue? I did try to increase the wal_sender_timeout and it broke the pub/sub. I increased the wal_receiver_timeout and it wouldn't attempt to restart the subscription until that time elapsed. Due to that, the WAL segments got removed by the time it came up again and