Re: further clarification: alter table alter column set not null - table scan is skipped

2025-08-04 Thread Shuyu Pan
Thanks a lot Álvaro for preparing the clarification so quickly. Looking forward to the release. If we mark a column to skip table scan during drop (phase 0) and later skip the  table scan when setting attributes (phase 7), we will not risk data corruption if the Access Exclusive lock is never rel

Re: further clarification: alter table alter column set not null - table scan is skipped

2025-08-04 Thread Álvaro Herrera
On 2025-Jul-31, Shuyu Pan wrote: > I like your versions that emphasize: don’t drop the constraint in the > same alter table set no null command. Similar to David’s point, I > spent some time trying to figure out a simple refactoring to carry the > optimization all the way to the end but it might

Re: further clarification: alter table alter column set not null - table scan is skipped

2025-07-31 Thread Shuyu Pan
I like your versions that emphasize: don’t drop the constraint in the same alter table set no null command. Similar to David’s point, I spent some time trying to figure out a simple refactoring to carry the optimization all the way to the end but it might require executing “set not null” sooner

further clarification: alter table alter column set not null - table scan is skipped

2025-07-31 Thread David G. Johnston
On Thursday, July 31, 2025, Álvaro Herrera wrote: > On 2025-Jul-30, David G. Johnston wrote: > > > On Wed, Jul 30, 2025, 13:55 PG Doc comments form > > > wrote: > > > > The "table scan is skipped" optimization can use some clarification > > > > > > https://www.postgresql.org/docs/current/sql-alt

Re: further clarification: alter table alter column set not null - table scan is skipped

2025-07-31 Thread Álvaro Herrera
On 2025-Jul-30, David G. Johnston wrote: > On Wed, Jul 30, 2025, 13:55 PG Doc comments form > wrote: > > The "table scan is skipped" optimization can use some clarification > > > > https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-SET-DROP-NOT-NULL > > My proposal i

Re: further clarification: alter table alter column set not null - table scan is skipped

2025-07-30 Thread David G. Johnston
On Wed, Jul 30, 2025, 13:55 PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/17/docguide.html > Description: > > Hello there, > I like PostgreSQL a lot so this is my way of giving back. > > The "table scan

further clarification: alter table alter column set not null - table scan is skipped

2025-07-30 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/17/docguide.html Description: Hello there, I like PostgreSQL a lot so this is my way of giving back. The "table scan is skipped" optimization can use some clarification https://www.postgresq