pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14295: Hot standby crash during tsvector rebuild
11+ messages / 3 participants
[nested] [flat]

* BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-08-26 07:26  spencer@whiteskycommunications.com
  0 siblings, 1 reply; 11+ messages in thread

From: spencer@whiteskycommunications.com @ 2016-08-26 07:26 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14295
Logged by:          Spencer Thomason
Email address:      spencer@whiteskycommunications.com
PostgreSQL version: 9.4.8
Operating system:   Solaris 11.3 SPARC
Description:        

Hello,
We have a fax server application that performs OCR and uses full text
search.  We have a nightly cron job that purges the stored text for old
records to save space.  The table contains approx 60K rows and the job
deletes the text from around 100-150 records each night and then updates a
tsvector column.  This database is replicated to 4 hot standby slaves, 2 in
the same data center and 2 in a remote location.  We have observed a few
crashes of all the hot standby server when this cron job runs.  All replicas
crash at the same time with the following log entries below.  The master
appears unaffected and continues to function normally.  Unfortunately I'm
unable to reproduce at will but I have observed this with 9.5.3 then we
downgraded to 9.4.8 and the crash just happened again.

Logs from one of the replicas is below:
2016-08-26 06:01:50 UTC FATAL:  unexpected GIN leaf action: 0
2016-08-26 06:01:50 UTC CONTEXT:  xlog redo Insert item, node:
1663/16387/33108 blkno: 6622 isdata: T isleaf: T 3 segments: 2 (add 0 items)
0 unknown action 0 ???
2016-08-26 06:01:50 UTC LOG:  startup process (PID 19593) exited with exit
code 1
2016-08-26 06:01:50 UTC LOG:  terminating any other active server
processes
2016-08-26 06:01:50 UTC WARNING:  terminating connection because of crash of
another server process

The table schema is:
    Column    |           Type           | Modifiers 
--------------+--------------------------+-----------
 id           | uuid                     | not null
 fax_did_id   | character varying(64)    | not null
 file_path    | character varying(255)   | 
 time_stamp   | timestamp with time zone | not null
 remote_id    | character varying(60)    | 
 caller_id    | character varying(40)    | 
 num_pages    | integer                  | 
 ocr_text     | text                     | 
 search_index | tsvector                 | 
 account_id   | integer                  | 
Indexes:
    "fax_rxfax_pkey" PRIMARY KEY, btree (id)
    "fax_rxfax_account_id" btree (account_id)
    "fax_rxfax_fax_did_id" btree (fax_did_id)
    "fax_rxfax_fax_did_id_like" btree (fax_did_id varchar_pattern_ops)
    "fax_rxfax_search_index" gin (search_index)
Foreign-key constraints:
    "fax_rxfax_account_id_fkey" FOREIGN KEY (account_id) REFERENCES
accounts(id) DEFERRABLE INITIALLY DEFERRED
    "fax_rxfax_fax_did_id_fkey" FOREIGN KEY (fax_did_id) REFERENCES
dids(number) DEFERRABLE INITIALLY DEFERRED

Please let me know if there is any other info I can provide.

Thanks,
Spencer



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-08-26 11:05  Tom Lane <tgl@sss.pgh.pa.us>
  parent: spencer@whiteskycommunications.com
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2016-08-26 11:05 UTC (permalink / raw)
  To: spencer@whiteskycommunications.com; +Cc: pgsql-bugs

spencer@whiteskycommunications.com writes:
> Logs from one of the replicas is below:
> 2016-08-26 06:01:50 UTC FATAL:  unexpected GIN leaf action: 0
> 2016-08-26 06:01:50 UTC CONTEXT:  xlog redo Insert item, node:
> 1663/16387/33108 blkno: 6622 isdata: T isleaf: T 3 segments: 2 (add 0 items)
> 0 unknown action 0 ???

Hmm, we have seen a couple of reports of that recently but have not been
able to track it down.  Can you provide more details about what you're
doing that triggers it?  Maybe even a self-contained test case?  It
doesn't have to be one that fails every time, as long as it'll fail
occasionally.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-08-29 17:32  Spencer Thomason <spencer@whiteskycommunications.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Spencer Thomason @ 2016-08-29 17:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hi Tom,
I'm working on labbing this up and hopefully I can replicate it outside of our production environment.

We have a text column that contains fair amount of text (e.g. generated from a fax of maybe 10-25 pages) and then a tsvector column of that text with a gin index.  To improve performance, we delete text on the old records nightly.

This appears to be related to number of records updated and the size of the update to the tsvector column.  Hopefully I can provide more details and a test case soon.

Thanks,
Spencer



> On Aug 26, 2016, at 4:05 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> spencer@whiteskycommunications.com writes:
>> Logs from one of the replicas is below:
>> 2016-08-26 06:01:50 UTC FATAL:  unexpected GIN leaf action: 0
>> 2016-08-26 06:01:50 UTC CONTEXT:  xlog redo Insert item, node:
>> 1663/16387/33108 blkno: 6622 isdata: T isleaf: T 3 segments: 2 (add 0 items)
>> 0 unknown action 0 ???
> 
> Hmm, we have seen a couple of reports of that recently but have not been
> able to track it down.  Can you provide more details about what you're
> doing that triggers it?  Maybe even a self-contained test case?  It
> doesn't have to be one that fails every time, as long as it'll fail
> occasionally.
> 
> 			regards, tom lane



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-01 14:22  Spencer Thomason <spencer@whiteskycommunications.com>
  parent: Spencer Thomason <spencer@whiteskycommunications.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Spencer Thomason @ 2016-09-01 14:22 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hi Tom,
I have a python script which simulates our production environment and so far I have been able to replicate the failure on demand.  What is the best way to make this available?

Also, I can make this sandbox environment available for remote access if that would help.

Thanks!
Spencer


> On Aug 29, 2016, at 10:32 AM, Spencer Thomason <spencer@whiteskycommunications.com> wrote:
> 
> Hi Tom,
> I'm working on labbing this up and hopefully I can replicate it outside of our production environment.
> 
> We have a text column that contains fair amount of text (e.g. generated from a fax of maybe 10-25 pages) and then a tsvector column of that text with a gin index.  To improve performance, we delete text on the old records nightly.
> 
> This appears to be related to number of records updated and the size of the update to the tsvector column.  Hopefully I can provide more details and a test case soon.
> 
> Thanks,
> Spencer
> 
> 
> 
>> On Aug 26, 2016, at 4:05 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 
>> spencer@whiteskycommunications.com writes:
>>> Logs from one of the replicas is below:
>>> 2016-08-26 06:01:50 UTC FATAL:  unexpected GIN leaf action: 0
>>> 2016-08-26 06:01:50 UTC CONTEXT:  xlog redo Insert item, node:
>>> 1663/16387/33108 blkno: 6622 isdata: T isleaf: T 3 segments: 2 (add 0 items)
>>> 0 unknown action 0 ???
>> 
>> Hmm, we have seen a couple of reports of that recently but have not been
>> able to track it down.  Can you provide more details about what you're
>> doing that triggers it?  Maybe even a self-contained test case?  It
>> doesn't have to be one that fails every time, as long as it'll fail
>> occasionally.
>> 
>> 			regards, tom lane
> 



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-01 14:27  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Spencer Thomason <spencer@whiteskycommunications.com>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2016-09-01 14:27 UTC (permalink / raw)
  To: Spencer Thomason <spencer@whiteskycommunications.com>; +Cc: pgsql-bugs

Spencer Thomason <spencer@whiteskycommunications.com> writes:
> I have a python script which simulates our production environment and so far I have been able to replicate the failure on demand.  What is the best way to make this available?

If it's not too large, posting it to this list would be great (we like to
have archived documentation about bugs).

If it is big, or you would rather not make it public, you can send it
to me off-list.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-01 18:34  Spencer Thomason <spencer@whiteskycommunications.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Spencer Thomason @ 2016-09-01 18:34 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Please see the attachments.

I have included the master and slave configs and python scripts that trigger this on our systems.  

The way to reproduce this are:
- create a new database 
- setup streaming replication to 2 or more slaves
- run the populate_db.py script
- if slaves do not crash, run the purge_db.py script followed by the populate_db.py script again.

I didn’t see failures immediately but within 15-20 mins of inserting records, the slaves crashed.

Also, I should note that this is on a SPARC T2 at 1.4GHz so the single thread performance might be a factor as well.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

  create-db.sql (application/octet-stream, 166B) download

  postgresql-slave.conf (application/octet-stream, 21.4K) download

  postgresql-master.conf (application/octet-stream, 21.4K) download

  words.txt (text/plain, 207.6K) download

populate_db.py (text/x-python-script, 3.6K) download #!/usr/bin/python import psycopg2 import random import sys from datetime import datetime, timedelta, tzinfo from uuid import uuid4 CREATE_RECORD_COUNT = 10000 WORDS_PER_PAGE = 250 CREATE_TABLE_SQL = """ CREATE TABLE "fax_rxfax" ( "id" uuid NOT NULL PRIMARY KEY, "search_index" tsvector, "file_path" varchar(255), "time_stamp" timestamp with time zone NOT NULL, "remote_id" varchar(60), "caller_id" varchar(40), "num_pages" integer, "ocr_text" text ); CREATE INDEX fax_rxfax_search_index ON fax_rxfax USING GIN(search_index); """ class UTC(tzinfo): """ UTC implementation taken from Python's docs. """ def __repr__(self): return "<UTC>" def utcoffset(self, dt): return timedelta(0) def tzname(self, dt): return "UTC" def dst(self, dt): return timedelta(0) utc = UTC() def now(): return datetime.utcnow().replace(tzinfo=utc) def gen_words(count): PUNCTUATION_LIST = ['. ', '. ', '? ', '! '] fp = open('words.txt', 'r') dictionary_list = [] for line in fp.readlines(): dictionary_list.append(line.strip()) word_list = [] sentence_len = random.randint(6, 15) capitalize = True for i in range(0, count): if i > 0: word_list.append(" ") if capitalize: word_list.append(random.choice(dictionary_list).capitalize()) capitalize = False else: word_list.append(random.choice(dictionary_list)) sentence_len -= 1 if sentence_len == 0: sentence_len = random.randint(6, 15) word_list.append(random.choice(PUNCTUATION_LIST)) capitalize = True word_list.append(random.choice(PUNCTUATION_LIST)) return "".join(word_list).strip() def gen_phone_number(): tn_list = [] for i in range(0, 10): if i == 0: tn_list.append("1") elif i == 1 or i == 4: tn_list.append(str(random.randint(2,9))) else: tn_list.append(str(random.randint(0,9))) i += 1 return "".join(tn_list) def main(): conn = psycopg2.connect("dbname=testdb user=testdbuser host=127.0.0.1 password=testdbuser port=5432") cur = conn.cursor() res = None try: cur.execute("SELECT count(*) FROM fax_rxfax;") conn.commit() except (psycopg2.ProgrammingError): conn.rollback() cur.execute(CREATE_TABLE_SQL) conn.commit() for i in xrange(0, CREATE_RECORD_COUNT): uuid = str(uuid4()) time_stamp = now() file_path = "/var/tmp/%s.pdf" % (uuid) caller_id = gen_phone_number() remote_id = "Fax Machine %s" % (caller_id) num_pages = random.randint(10, 30) ocr_text = gen_words(num_pages * WORDS_PER_PAGE) cur.execute("INSERT INTO fax_rxfax (id, file_path, time_stamp, remote_id, caller_id, num_pages, ocr_text) VALUES (%s, %s, %s, %s, %s, %s, %s)", (uuid, file_path, time_stamp, remote_id, caller_id, num_pages, ocr_text)) conn.commit() cur.execute("""UPDATE fax_rxfax SET search_index = setweight( to_tsvector( 'pg_catalog.english', coalesce("ocr_text",'') ), 'A' ) || setweight( to_tsvector( 'pg_catalog.english', coalesce("caller_id",'') ), 'A' ) || setweight( to_tsvector( 'pg_catalog.english', coalesce("remote_id",'') ), 'A' ) WHERE id = (%s);""", (uuid,)) conn.commit() sys.stdout.write("Created record id: %s\n" % uuid) if __name__ == '__main__': main()
purge_db.py (text/x-python-script, 947B) download #!/usr/bin/python import psycopg2 import sys def main(): conn = psycopg2.connect("dbname=testdb user=testdbuser host=127.0.0.1 password=testdbuser port=5432") cur = conn.cursor() cur.execute("SELECT id FROM fax_rxfax;") while True: res = cur.fetchmany(100) if not res: break for record in res: print record[0] cur2 = conn.cursor() cur2.execute("""UPDATE fax_rxfax SET ocr_text = '' WHERE id = %s;""", record) cur2.execute("""UPDATE fax_rxfax SET search_index = setweight( to_tsvector( 'pg_catalog.english', coalesce("ocr_text",'') ), 'A' ) || setweight( to_tsvector( 'pg_catalog.english', coalesce("caller_id",'') ), 'A' ) || setweight( to_tsvector( 'pg_catalog.english', coalesce("remote_id",'') ), 'A' ) WHERE id = %s;""", record) conn.commit() conn.commit() if __name__ == '__main__': main()
ATT00001.txt (text/plain, 595B) download Thanks! Spencer > On Sep 1, 2016, at 7:27 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Spencer Thomason <spencer@whiteskycommunications.com> writes: >> I have a python script which simulates our production environment and so far I have been able to replicate the failure on demand. What is the best way to make this available? > > If it's not too large, posting it to this list would be great (we like to > have archived documentation about bugs). > > If it is big, or you would rather not make it public, you can send it > to me off-list. > > regards, tom lane
^ permalink raw reply [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-02 23:46  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Spencer Thomason <spencer@whiteskycommunications.com>
  0 siblings, 2 replies; 11+ messages in thread

From: Tom Lane @ 2016-09-02 23:46 UTC (permalink / raw)
  To: Spencer Thomason <spencer@whiteskycommunications.com>; +Cc: pgsql-bugs

Spencer Thomason <spencer@whiteskycommunications.com> writes:
> I have included the master and slave configs and python scripts that trigger this on our systems.  

Thanks for sending this.  Unfortunately I've had zero success reproducing
the problem so far.  I had about run out of ideas as to what might explain
why it fails for you and not me, when I noticed this:

> Also, I should note that this is on a SPARC T2 at 1.4GHz so the single thread performance might be a factor as well.

Am I right in thinking that is a 32-bit machine?  That might have
something to do with it (notably because of different maxalign).
Is the production machine you originally saw the problem on also 32-bit?

While I'm asking questions, could you send along the output of pg_config
for the build you're using?

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-03 15:19  Spencer Thomason <spencer@whiteskycommunications.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 11+ messages in thread

From: Spencer Thomason @ 2016-09-03 15:19 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hi Tom,
This a 64 bit machine and I’m happy to provide remote access if that helps.  Requested info below.  Thanks for the follow up!

$ uname -a
SunOS pg-test-1.wtsky.net 5.11 11.3 sun4v sparc SUNW,T5240 Solaris

$ pg_config
BINDIR = /usr/postgresql/9.4/bin
DOCDIR = /usr/share/doc/postgresql-doc-9.4
HTMLDIR = /usr/share/doc/postgresql-doc-9.4
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/server
LIBDIR = /usr/lib/sparcv9
PKGLIBDIR = /usr/lib/sparcv9/postgresql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/9.4/man
SHAREDIR = /usr/share/postgresql/9.4
SYSCONFDIR = /etc/postgresql/9.4
PGXS = /usr/lib/sparcv9/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = 'CC=/opt/solarisstudio12.4/bin/cc' 'CFLAGS=-m64 -xO5 -fast -fsimple=0 -xalias_level=any' 'LDFLAGS=-m64' '--with-libedit-preferred' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' '--mandir=/usr/share/postgresql/9.4/man' '--docdir=/usr/share/doc/postgresql-doc-9.4' '--sysconfdir=/etc/postgresql/9.4' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.4' '--bindir=/usr/postgresql/9.4/bin' '--libdir=/usr/lib/sparcv9/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-dtrace' 'DTRACEFLAGS=-64' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--disable-rpath' '--with-uuid=e2fs' '--with-pgport=5432' '--with-system-tzdata=/usr/share/lib/zoneinfo'
CC = /opt/solarisstudio12.4/bin/cc -Xa
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -m64 -xO5 -fast -fsimple=0 -xalias_level=any
CFLAGS_SL = -KPIC
LDFLAGS = -L../../../src/common -m64 -Wl,--as-needed
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lz -ledit -lnsl -lsocket -lm 
VERSION = PostgreSQL 9.4.8


> On Sep 2, 2016, at 6:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> Spencer Thomason <spencer@whiteskycommunications.com> writes:
>> I have included the master and slave configs and python scripts that trigger this on our systems.  
> 
> Thanks for sending this.  Unfortunately I've had zero success reproducing
> the problem so far.  I had about run out of ideas as to what might explain
> why it fails for you and not me, when I noticed this:
> 
>> Also, I should note that this is on a SPARC T2 at 1.4GHz so the single thread performance might be a factor as well.
> 
> Am I right in thinking that is a 32-bit machine?  That might have
> something to do with it (notably because of different maxalign).
> Is the production machine you originally saw the problem on also 32-bit?
> 
> While I'm asking questions, could you send along the output of pg_config
> for the build you're using?
> 
> 			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-03 15:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 11+ messages in thread

From: Tom Lane @ 2016-09-03 15:26 UTC (permalink / raw)
  To: Spencer Thomason <spencer@whiteskycommunications.com>; +Cc: pgsql-bugs

I wrote:
> Spencer Thomason <spencer@whiteskycommunications.com> writes:
>> Also, I should note that this is on a SPARC T2 at 1.4GHz so the single thread performance might be a factor as well.

> Am I right in thinking that is a 32-bit machine?  That might have
> something to do with it (notably because of different maxalign).

Awhile later it occurred to me that SPARCs are generally big-endian,
which led me to try your example on an old HPPA box, and kaboom!
I've now traced it to this bit in gindatapage.c:

    int            nmodifieditems;

    ...

                memcpy(walbufend, &seginfo->nmodifieditems, sizeof(uint16));

which of course works fine on little-endian hardware and not at all on
big-endian.  There might be more bugs (takes a while to run your example
on that old dinosaur :-() but this one is sufficient to explain the
known symptoms.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-03 15:49  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 11+ messages in thread

From: Tom Lane @ 2016-09-03 15:49 UTC (permalink / raw)
  To: Spencer Thomason <spencer@whiteskycommunications.com>; +Cc: pgsql-bugs

I wrote:
> I've now traced it to this bit in gindatapage.c:

The attached patch (against 9.4) should be sufficient to fix this problem.
Perhaps you can do some testing there while I'm doing the same.

			regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Attachments:

gin-big-endian-bug.patch (text/x-diff, 423B) download diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c index 2090209..77725ac 100644 --- a/src/backend/access/gin/gindatapage.c +++ b/src/backend/access/gin/gindatapage.c @@ -86,7 +86,7 @@ typedef struct char action; ItemPointerData *modifieditems; - int nmodifieditems; + uint16 nmodifieditems; /* * The following fields represent the items in this segment. If 'items' is
^ permalink raw reply [nested|flat] 11+ messages in thread

* Re: BUG #14295: Hot standby crash during tsvector rebuild
@ 2016-09-06 19:48  Spencer Thomason <spencer@whiteskycommunications.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Spencer Thomason @ 2016-09-06 19:48 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

Hi Tom,
I've been testing this from some time and this appears to resolve the issue.  Thanks for the quick fix!

Best regards,
Spencer


> On Sep 3, 2016, at 8:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> I wrote:
>> I've now traced it to this bit in gindatapage.c:
> 
> The attached patch (against 9.4) should be sufficient to fix this problem.
> Perhaps you can do some testing there while I'm doing the same.
> 
> 			regards, tom lane
> 
> diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c
> index 2090209..77725ac 100644
> --- a/src/backend/access/gin/gindatapage.c
> +++ b/src/backend/access/gin/gindatapage.c
> @@ -86,7 +86,7 @@ typedef struct
> 	char		action;
> 
> 	ItemPointerData *modifieditems;
> -	int			nmodifieditems;
> +	uint16		nmodifieditems;
> 
> 	/*
> 	 * The following fields represent the items in this segment. If 'items' is



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 11+ messages in thread


end of thread, other threads:[~2016-09-06 19:48 UTC | newest]

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 07:26 BUG #14295: Hot standby crash during tsvector rebuild spencer@whiteskycommunications.com
2016-08-26 11:05 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-08-29 17:32   ` Spencer Thomason <spencer@whiteskycommunications.com>
2016-09-01 14:22     ` Spencer Thomason <spencer@whiteskycommunications.com>
2016-09-01 14:27       ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-01 18:34         ` Spencer Thomason <spencer@whiteskycommunications.com>
2016-09-02 23:46           ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-03 15:19             ` Spencer Thomason <spencer@whiteskycommunications.com>
2016-09-03 15:26             ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-03 15:49               ` Tom Lane <tgl@sss.pgh.pa.us>
2016-09-06 19:48                 ` Spencer Thomason <spencer@whiteskycommunications.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox