Asking the same question on multiple lists is strongly frowned upon.
On 3/7/20 1:29 PM, Ashkar Dev wrote:
Hi all,
how to fix a problem, suppose there is a table with id and username
if I set the id to bigint so the limit is 9223372036854775807
if I insert for example 3 rows
id username
--
On 3/7/20 11:29 AM, Ashkar Dev wrote:
Hi all,
how to fix a problem, suppose there is a table with id and username
if I set the id to bigint so the limit is 9223372036854775807
if I insert for example 3 rows
id username
-- --
1 abc
2 def
3 ghi
if I delete all rows
You can fix the problem with this query:
SELECT setval('chinese_price_infos_id_seq', sq.val) from ( SELECT
MAX(id) as val FROM chinese_price_infos ) sq;
But you have to search in your application because in some point the
app are inserting the id column instead of leave this task to the DB.
If y
On Mon, May 6, 2019 at 6:05 AM Arup Rakshit wrote:
SELECT MAX(id) FROM chinese_price_infos; max 128520(1 row)
SELECT nextval('chinese_price_infos_id_seq'); nextval - 71164(1
row)
Not sure how it is out of sync. How can I fix this permanently. I ran
vacuum analyze verbose;
On 06/05/2019 12:10, Arup Rakshit wrote:
Hi,
Thanks for your reply. It is automatic, my app don’t creates ID, it
delegates it to the DB. I am using Ruby on Rails app, where we use
Postgresql.
Well, I'm only throwing out wild guesses, but another possibility is
that rows were loaded manually i
Hi,
Thanks for your reply. It is automatic, my app don’t creates ID, it delegates
it to the DB. I am using Ruby on Rails app, where we use Postgresql.
docking_dev=# \d chinese_price_infos;
Table "public.chinese_price_infos"
Column|Type
On 06/05/2019 12:05, Arup Rakshit wrote:
Every time I try to insert I get the error:
docking_dev=# INSERT INTO "chinese_price_infos" ("item_code",
"price_cents", "unit", "description", "company_id", "created_at",
"updated_at") VALUES ('01GS10001', 6000, 'Lift', 'Shore Crane
Rental', '9ae3f8b8-8f
Raghavendra Rao J S V wrote:
> While performing vacuum full, I have received the below highlighted error.
> Please guide me how to resolve this issue.
>
>
> /opt/postgres/9.2/bin/psql -p 5433 --username=cmuser cpcm -c "VACUUM FULL
> ANALYZE;"
>
>
> ERROR: duplicate key value violates uniqu