There is nothing in pg_prepared_xacts, however, in pg_stat_activity there are two pglogical processes that have a "backend_start" of "2017-06-17" when the last time we restarted this server. Both are not waiting and have null for "state." This might be expected behavior for pglogical.
I did try TRUNCATE before but even as the postgres user, but for some reason it didn't allow me to truncate because it was a system table.On Tue, Oct 31, 2017 at 5:56 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Arjun Ranade <ranade@xxxxxxxxxxxxxxxxx> writes:
> Yes, it is still reproducible. When I try to VACUUM FULL right now, I get
> the same error.
> This is postgres 9.4. I am new to gdb, but based on what you said, I have
> the following output:
> Breakpoint 1, 0x0000000000768be0 in errfinish ()
> (gdb) bt
> #0 0x0000000000768be0 in errfinish ()
> #1 0x000000000076998c in elog_finish ()
> #2 0x0000000000495960 in ?? ()
> #3 0x0000000000496075 in heap_tuple_fetch_attr ()
> #4 0x0000000000496572 in toast_insert_or_update ()
> #5 0x0000000000492ce1 in ?? ()
> #6 0x0000000000493733 in rewrite_heap_tuple ()
> #7 0x000000000053ebdf in ?? ()
> #8 0x000000000053f68e in cluster_rel ()
> #9 0x0000000000590a1b in ?? ()
> #10 0x0000000000590f9f in vacuum ()
> #11 0x000000000068ee77 in standard_ProcessUtility ()
Hm. I suspect what is happening is that VACUUM is trying to copy a tuple
that you deleted, but which it thinks is still visible to some open
transaction. Do you have any really old transactions hanging around,
according to pg_stat_activity or pg_prepared_xacts?
If that is not it, probably truncating pg_statistic instead of just
doing "delete from pg_statistic" would solve the problem. But we're
no closer to understanding what was the original source of the issue.
regards, tom lane