agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedrelease timing
9+ messages / 5 participants
[nested] [flat]
* release timing
@ 2003-11-07 17:02 Bruce Momjian <pgman@candle.pha.pa.us>
2003-11-07 17:40 ` Re: release timing Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Momjian @ 2003-11-07 17:02 UTC (permalink / raw)
To: pgsql-hackers
What is the current schedule for RC2/final?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: release timing
2003-11-07 17:02 release timing Bruce Momjian <pgman@candle.pha.pa.us>
@ 2003-11-07 17:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-11-07 17:50 ` Re: release timing Marc G. Fournier <scrappy@postgresql.org>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2003-11-07 17:40 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> What is the current schedule for RC2/final?
I believe the plan is to wrap RC2 this Sunday evening, and to release
final the following Monday (11/17), barring problems. Core will make
a go/no-go release decision Thursday evening, and if it's "go" we'll
put a hard code freeze in place then, with only docs changes allowed
before the release is wrapped next Sunday.
[ core guys: that is what we agreed to, right? ]
regards, tom lane
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: release timing
2003-11-07 17:02 release timing Bruce Momjian <pgman@candle.pha.pa.us>
2003-11-07 17:40 ` Re: release timing Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-11-07 17:50 ` Marc G. Fournier <scrappy@postgresql.org>
0 siblings, 0 replies; 9+ messages in thread
From: Marc G. Fournier @ 2003-11-07 17:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; pgsql-hackers
On Fri, 7 Nov 2003, Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > What is the current schedule for RC2/final?
>
> I believe the plan is to wrap RC2 this Sunday evening, and to release
> final the following Monday (11/17), barring problems. Core will make
> a go/no-go release decision Thursday evening, and if it's "go" we'll
> put a hard code freeze in place then, with only docs changes allowed
> before the release is wrapped next Sunday.
>
> [ core guys: that is what we agreed to, right? ]
That was my understanding as well ... gives the Advocacy crew an extra bit
of time to deal with their issues, and gives an extra week for any docs
changes to trickle in ...
^ permalink raw reply [nested|flat] 9+ messages in thread
* [PATCH 2/4] Write WAL for empty nbtree index build
@ 2018-10-11 01:03 Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
0 siblings, 0 replies; 9+ messages in thread
From: Kyotaro Horiguchi @ 2018-10-11 01:03 UTC (permalink / raw)
After relation truncation indexes are also rebuild. It doesn't emit
WAL in minimal mode and if truncation happened within its creation
transaction, crash recovery leaves an empty index heap, which is
considered broken. This patch forces to emit WAL when an index_build
turns into empty nbtree index.
---
src/backend/access/nbtree/nbtsort.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index dc398e1186..70d4380533 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -611,8 +611,14 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
/* Ensure rd_smgr is open (could have been closed by relcache flush!) */
RelationOpenSmgr(wstate->index);
- /* XLOG stuff */
- if (wstate->btws_use_wal)
+ /* XLOG stuff
+ *
+ * Even if minimal mode, WAL is required here if truncation happened after
+ * being created in the same transaction. It is not needed otherwise but
+ * we don't bother identifying the case precisely.
+ */
+ if (wstate->btws_use_wal ||
+ (blkno == BTREE_METAPAGE && BTPageGetMeta(page)->btm_root == 0))
{
/* We use the heap NEWPAGE record type for this */
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
@@ -1056,6 +1062,11 @@ _bt_uppershutdown(BTWriteState *wstate, BTPageState *state)
* set to point to "P_NONE"). This changes the index to the "valid" state
* by filling in a valid magic number in the metapage.
*/
+ /*
+ * If no tuple was inserted, it's possible that we are truncating a
+ * relation. We need to emit WAL for the metapage in the case. However it
+ * is not required elsewise,
+ */
metapage = (Page) palloc(BLCKSZ);
_bt_initmetapage(metapage, rootblkno, rootlevel);
_bt_blwritepage(wstate, metapage, BTREE_METAPAGE);
--
2.16.3
----Next_Part(Mon_Mar_04_12_24_48_2019_788)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="v7-0003-Add-infrastructure-to-WAL-logging-skip-feature.patch"
^ permalink raw reply [nested|flat] 9+ messages in thread
* [PATCH 3/3] Write WAL for empty nbtree index build
@ 2018-10-11 01:03 Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
0 siblings, 0 replies; 9+ messages in thread
From: Kyotaro Horiguchi @ 2018-10-11 01:03 UTC (permalink / raw)
After relation truncation indexes are also rebuild. It doesn't emit
WAL in minimal mode and if truncation happened within its creation
transaction, crash recovery leaves an empty index heap, which is
considered broken. This patch forces to emit WAL when an index_build
turns into empty nbtree index.
---
src/backend/access/nbtree/nbtsort.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 16f5755777..2c2647b530 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -610,8 +610,14 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
/* Ensure rd_smgr is open (could have been closed by relcache flush!) */
RelationOpenSmgr(wstate->index);
- /* XLOG stuff */
- if (wstate->btws_use_wal)
+ /* XLOG stuff
+ *
+ * Even if minimal mode, WAL is required here if truncation happened after
+ * being created in the same transaction. It is not needed otherwise but
+ * we don't bother identifying the case precisely.
+ */
+ if (wstate->btws_use_wal ||
+ (blkno == BTREE_METAPAGE && BTPageGetMeta(page)->btm_root == 0))
{
/* We use the heap NEWPAGE record type for this */
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
@@ -1055,6 +1061,11 @@ _bt_uppershutdown(BTWriteState *wstate, BTPageState *state)
* set to point to "P_NONE"). This changes the index to the "valid" state
* by filling in a valid magic number in the metapage.
*/
+ /*
+ * If no tuple was inserted, it's possible that we are truncating a
+ * relation. We need to emit WAL for the metapage in the case. However it
+ * is not required elsewise,
+ */
metapage = (Page) palloc(BLCKSZ);
_bt_initmetapage(metapage, rootblkno, rootlevel);
_bt_blwritepage(wstate, metapage, BTREE_METAPAGE);
--
2.16.3
----Next_Part(Thu_Oct_11_13_42_35_2018_969)----
^ permalink raw reply [nested|flat] 9+ messages in thread
* [PATCH 2/4] Write WAL for empty nbtree index build
@ 2018-10-11 01:03 Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
0 siblings, 0 replies; 9+ messages in thread
From: Kyotaro Horiguchi @ 2018-10-11 01:03 UTC (permalink / raw)
After relation truncation indexes are also rebuild. It doesn't emit
WAL in minimal mode and if truncation happened within its creation
transaction, crash recovery leaves an empty index heap, which is
considered broken. This patch forces to emit WAL when an index_build
turns into empty nbtree index.
---
src/backend/access/nbtree/nbtsort.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 16f5755777..2c2647b530 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -610,8 +610,14 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
/* Ensure rd_smgr is open (could have been closed by relcache flush!) */
RelationOpenSmgr(wstate->index);
- /* XLOG stuff */
- if (wstate->btws_use_wal)
+ /* XLOG stuff
+ *
+ * Even if minimal mode, WAL is required here if truncation happened after
+ * being created in the same transaction. It is not needed otherwise but
+ * we don't bother identifying the case precisely.
+ */
+ if (wstate->btws_use_wal ||
+ (blkno == BTREE_METAPAGE && BTPageGetMeta(page)->btm_root == 0))
{
/* We use the heap NEWPAGE record type for this */
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
@@ -1055,6 +1061,11 @@ _bt_uppershutdown(BTWriteState *wstate, BTPageState *state)
* set to point to "P_NONE"). This changes the index to the "valid" state
* by filling in a valid magic number in the metapage.
*/
+ /*
+ * If no tuple was inserted, it's possible that we are truncating a
+ * relation. We need to emit WAL for the metapage in the case. However it
+ * is not required elsewise,
+ */
metapage = (Page) palloc(BLCKSZ);
_bt_initmetapage(metapage, rootblkno, rootlevel);
_bt_blwritepage(wstate, metapage, BTREE_METAPAGE);
--
2.16.3
----Next_Part(Thu_Dec_20_17_32_25_2018_311)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="v5-0003-Add-infrastructure-to-WAL-logging-skip-feature.patch"
^ permalink raw reply [nested|flat] 9+ messages in thread
* [PATCH 2/4] Write WAL for empty nbtree index build
@ 2018-10-11 01:03 Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
0 siblings, 0 replies; 9+ messages in thread
From: Kyotaro Horiguchi @ 2018-10-11 01:03 UTC (permalink / raw)
After relation truncation indexes are also rebuild. It doesn't emit
WAL in minimal mode and if truncation happened within its creation
transaction, crash recovery leaves an empty index heap, which is
considered broken. This patch forces to emit WAL when an index_build
turns into empty nbtree index.
---
src/backend/access/nbtree/nbtsort.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index dc398e1186..70d4380533 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -611,8 +611,14 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
/* Ensure rd_smgr is open (could have been closed by relcache flush!) */
RelationOpenSmgr(wstate->index);
- /* XLOG stuff */
- if (wstate->btws_use_wal)
+ /* XLOG stuff
+ *
+ * Even if minimal mode, WAL is required here if truncation happened after
+ * being created in the same transaction. It is not needed otherwise but
+ * we don't bother identifying the case precisely.
+ */
+ if (wstate->btws_use_wal ||
+ (blkno == BTREE_METAPAGE && BTPageGetMeta(page)->btm_root == 0))
{
/* We use the heap NEWPAGE record type for this */
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
@@ -1056,6 +1062,11 @@ _bt_uppershutdown(BTWriteState *wstate, BTPageState *state)
* set to point to "P_NONE"). This changes the index to the "valid" state
* by filling in a valid magic number in the metapage.
*/
+ /*
+ * If no tuple was inserted, it's possible that we are truncating a
+ * relation. We need to emit WAL for the metapage in the case. However it
+ * is not required elsewise,
+ */
metapage = (Page) palloc(BLCKSZ);
_bt_initmetapage(metapage, rootblkno, rootlevel);
_bt_blwritepage(wstate, metapage, BTREE_METAPAGE);
--
2.16.3
----Next_Part(Wed_Jan_30_10_26_34_2019_453)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="v6-0003-Add-infrastructure-to-WAL-logging-skip-feature.patch"
^ permalink raw reply [nested|flat] 9+ messages in thread
* [PATCH 2/7] Write WAL for empty nbtree index build
@ 2018-10-11 01:03 Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
0 siblings, 0 replies; 9+ messages in thread
From: Kyotaro Horiguchi @ 2018-10-11 01:03 UTC (permalink / raw)
After relation truncation indexes are also rebuild. It doesn't emit
WAL in minimal mode and if truncation happened within its creation
transaction, crash recovery leaves an empty index heap, which is
considered broken. This patch forces to emit WAL when an index_build
turns into empty nbtree index.
---
src/backend/access/nbtree/nbtsort.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 9ac4c1e1c0..a31d58025f 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -654,8 +654,16 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
/* Ensure rd_smgr is open (could have been closed by relcache flush!) */
RelationOpenSmgr(wstate->index);
- /* XLOG stuff */
- if (wstate->btws_use_wal)
+ /* XLOG stuff
+ *
+ * Even when wal_level is minimal, WAL is required here if truncation
+ * happened after being created in the same transaction. This is hacky but
+ * we cannot use BufferNeedsWAL() stuff for nbtree since it can emit
+ * atomic WAL records on multiple buffers.
+ */
+ if (wstate->btws_use_wal ||
+ (RelationNeedsWAL(wstate->index) &&
+ (blkno == BTREE_METAPAGE && BTPageGetMeta(page)->btm_root == 0)))
{
/* We use the heap NEWPAGE record type for this */
log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
--
2.16.3
----Next_Part(Fri_Apr_05_12_55_20_2019_986)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="v11-0003-Move-XLOG-stuff-from-heap_insert-and-heap_delete.patch"
^ permalink raw reply [nested|flat] 9+ messages in thread
* [PATCH] Turn protective Assert() into elog(ERROR)
@ 2026-05-01 07:23 Álvaro Herrera <alvherre@kurilemu.de>
0 siblings, 0 replies; 9+ messages in thread
From: Álvaro Herrera @ 2026-05-01 07:23 UTC (permalink / raw)
---
src/backend/access/index/genam.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/backend/access/index/genam.c b/src/backend/access/index/genam.c
index 97d44b84622..7d401e3f137 100644
--- a/src/backend/access/index/genam.c
+++ b/src/backend/access/index/genam.c
@@ -396,11 +396,13 @@ systable_beginscan(Relation heapRelation,
/*
* If this backend promised that it won't access shared catalogs during
- * logical decoding, this it the right place to verify.
+ * logical decoding, this is the right place to verify.
*/
- Assert(!HistoricSnapshotActive() ||
- accessSharedCatalogsInDecoding ||
- !heapRelation->rd_rel->relisshared);
+ if (HistoricSnapshotActive() &&
+ !accessSharedCatalogsInDecoding &&
+ heapRelation->rd_rel->relisshared)
+ elog(ERROR,
+ "cannot access shared catalog with database-specific historic snapshot");
if (indexOK &&
!IgnoreSystemIndexes &&
--
2.47.3
--k6vxbflu22czkb7a--
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2026-05-01 07:23 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-07 17:02 release timing Bruce Momjian <pgman@candle.pha.pa.us>
2003-11-07 17:40 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-11-07 17:50 ` Marc G. Fournier <scrappy@postgresql.org>
2018-10-11 01:03 [PATCH 2/4] Write WAL for empty nbtree index build Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
2018-10-11 01:03 [PATCH 3/3] Write WAL for empty nbtree index build Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
2018-10-11 01:03 [PATCH 2/4] Write WAL for empty nbtree index build Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
2018-10-11 01:03 [PATCH 2/4] Write WAL for empty nbtree index build Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
2018-10-11 01:03 [PATCH 2/7] Write WAL for empty nbtree index build Kyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
2026-05-01 07:23 [PATCH] Turn protective Assert() into elog(ERROR) Álvaro Herrera <alvherre@kurilemu.de>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox