Update on this –
Thanks for the feedback.
We just completed this process successfully. One thing we noticed was,
after creating the view and having the code start to read from it instead
of the table, we saw a significant postgres memory spike. It lasted until
we dropped the view and renamed the
Ben Buckman wrote:
Hello,
I would like to rename a table with ~35k rows (on pgsql 9.4), let's say
from `oldthings` to `newthings`.
Our application is actively reading from and writing to this table, and
the code will break if the table name suddenly changes at runtime. So I
can't simply run an
Oh yeah, the table structure will change after this is all done, but not in
the middle of it. The view would only last a few minutes and maintain the
exact same schema.
Thanks for the tip re: deadlocks, I'll keep that in mind!
Ben
On Wed, Jun 8, 2016 at 1:24 PM, Andy Colson
On 6/8/2016 12:57 PM, Ben Buckman wrote:
Hello,
I would like to rename a table with ~35k rows (on pgsql 9.4), let's say
from `oldthings` to `newthings`.
Our application is actively reading from and writing to this table, and
the code will break if the table name suddenly changes at runtime. So I
On 6/8/2016 2:57 PM, Ben Buckman wrote:
Thanks Andy.
My understanding, and please correct me if I'm wrong, is that the view
will effectively inherit the table's constraints, because writes to the
view that can't be written to the table will fail on the table. Re:
"will the data be good data,"
Thanks Andy.
My understanding, and please correct me if I'm wrong, is that the view will
effectively inherit the table's constraints, because writes to the view
that can't be written to the table will fail on the table. Re: "will the
data be good data," what risks should I be considering?
In
On 6/8/2016 12:57 PM, Ben Buckman wrote:
Hello,
I would like to rename a table with ~35k rows (on pgsql 9.4), let's say
from `oldthings` to `newthings`.
Our application is actively reading from and writing to this table, and
the code will break if the table name suddenly changes at runtime. So I
Hello,
I would like to rename a table with ~35k rows (on pgsql 9.4), let's say
from `oldthings` to `newthings`.
Our application is actively reading from and writing to this table, and the
code will break if the table name suddenly changes at runtime. So I can't
simply run an `ALTER TABLE oldthings